Access Denied For User 'root'@'localhost' (using Password: Yes) Mac

суббота 11 апреляadmin

To change your font and format, use the options at the top of the message window. Write your email in the body of the message. Enter a subject for your message. Or choose File Attach Files, choose an attachment, then click Choose. To add an attachment, drag an attachment to the body of the message. Choosing an email other than mac imail for google chrome.

Here are the steps to follow to fix it on Mac OS X 10.10.5 and MySQL v.5.7.10

  • Stop mysqld : The easiest way to stop mysqld is via MySQL in “System Preferences”. Just open it, look for MySQL and hit “Stop MySQL Server” button .

The username and password in the config.php file only tell PhpMyAdmin (after here: PMA) what username and password to use for logging in to MySQL; changing the.

If you didn’t install this utility, you need to go with launchctl tool. Open Terminal, and enter the following command: (as root user)

sh-3.2# launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

If com.oracle.oss.mysql.mysqld.plist is not installed, just run killall command as root:

sh-3.2# killall mysqld
  • From Terminal , launch mysqld using this command:
sh-3.2# /usr/local/mysql/bin/mysqld –skip-grant-tables
  • From Terminal , connect to your mysql using this command:
sh-3.2# mysql -u root

And enter the following command from mysql prompt:(if you have a ‘root’ user):

mysql> FLUSH PRIVILEGES;
mysql> UPDATE mysql.user SET authentication_string=PASSWORD(‘foobarpass’) WHERE User=’root’;
  • Quit you mysql session and stop your mysqld :
mysql> quit;
sh-3.2# killall mysqld
  • Start your mysql from System Preferences > MySQL or with launchctl:
sh-3.2# launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

You can also start MySQL with this command:

sh-3.2# /usr/local/mysql/bin/mysqld -u root -p (you need to enter your new password : foobarpass )

You should be able to connect to your mysql with your new password.