Cannot log in to phpMyAdmin with my root password for mySQL (on Mac OS X Lion)

馋奶兔 提交于 2019-11-30 12:10:01
Sepp

In config.inc.php change localhost to 127.0.0.1 for $cfg['Servers'][$i]['host'] key.

Take a look at this tutorial

Make sure your password is correct, if you need it you can change it with this

/usr/local/mysql/bin/mysqladmin -u root -p password

When it asks for a password, do not enter anything, just hit enter. It will then ask you to enter new password, then confirm. Finished.

Then you will need also to do this.

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
lbsweek
  1. Change phpMyAdmin/config.sample.inc.php to phpMyAdmin/config.inc.php;
  2. In config.inc.php, change localhost to 127.0.0.1;
  3. There is another config.inc.php in phpMyAdmin/setup/frames/config.inc.php, please ignore it.
MehdiPRG

Hey I had this problem but I fixed this. I just created a new user for mysql and then you can just login to your phpmyadmin.

Do the following things:

mysql -u root -p

and then enter your password:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'enter your password just right here';

and set the all permissions for your new user.

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

and then

FLUSH PRIVILEGES;

Thank you.

When it says (using password: NO) it means that it isn't receiving a password.

Use /usr/local/mysql/bin/mysqladmin -u root -p *******

Best way to do this is:

Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.

Stop the MySQL Server.

sudo /etc/init.d/mysql stop

Start the mysqld configuration.

sudo mysqld --skip-grant-tables &

Login to MySQL as root.

mysql -u root mysql

Replace YOURNEWPASSWORD with your new password!

UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;

hope this help someoneelse..it worked for me!!

In addition to Sepp's answer, I would also like to point out that if you have set MySQL port to another port (i.e. 3307) , you can append the port number like this:

$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';

to the config.inc.php file

I hope anyone who used a different port number can benefit from my answer

And check this mysql config file -

[mysqld] default_password_lifetime=0

https://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!