Ubuntu – ” Access denied for user ‘phptheadmin’@’localhost’ ” while installing phptheadmin phpmyadmin I got " Access denied for user 'phpmyadmin'@'localhost' " in the process of installing phpmyadmin in Ubuntu 16.04 Best Answer Seems like your permissions aren't set right for root user or you have lost your MySQL root password. I would try resetting MySQL password for root and trying again. I guess this is the fastest way. Follow these steps step 1 Stop the mysql demon with this command sudo /etc/init.d/mysql stop step 2 Start the mysql demon process with following sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking & (at this point it's safest to disable networking) step 3 Start the mysql client with mysql -u root step 4 Then run following in mysql prompt, so you are able to change any password FLUSH PRIVILEGES; step 5 Then reset password with SET PASSWORD FOR root@'localhost' = PASSWORD('password'); step 6 In case you happen to have a mysql root account that can connect from everywhere, this is recommended UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; step 7 Once you receive a message indicating a succesful query, then run FLUSH PRIVILEGES; step 8 Stop mysql and relaunch it with sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start I suppose you have these installed web server apache php php_mysql support for apache source: https://help.ubuntu.com/community/MysqlPasswordReset Related SolutionsUbuntu – How to access phpMyAdmin Then you haven't installed it correctly; try installing with this command: sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin If that doesn't work, then try this fix: sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf sudo /etc/init.d/apache2 reload Related QuestionUbuntu – How to access phpMyAdmin
Best Answer
Seems like your permissions aren't set right for root user or you have lost your MySQL root password.
I would try resetting MySQL password for root and trying again. I guess this is the fastest way. Follow these steps
step 1
Stop the mysql demon with this command
step 2
Start the mysql demon process with following
(at this point it's safest to disable networking)
step 3
Start the mysql client with
step 4
Then run following in mysql prompt, so you are able to change any password
step 5
Then reset password with
step 6
In case you happen to have a mysql root account that can connect from everywhere, this is recommended
step 7
Once you receive a message indicating a succesful query, then run
step 8
Stop mysql and relaunch it with
I suppose you have these installed
web server apache
php
php_mysql support for apache
source: https://help.ubuntu.com/community/MysqlPasswordReset