change mysql root password on mac os
Author: Игорь Т
21918 View
3m 6s Lenght
35 Rating
Short video describing how to change lost mysql root password on Mac OS X (Mavericks)
Comments
-
Thank you very much!. But now in new version of my sql you need this: update user set authentication_string=password('1111') where user='root';
-
insist of
UPDATE mysql.user SET Password=PASSWORD('your password ') WHERE User='root';
use
UPDATE mysql.user SET password_expired='N', authentication_string=PASSWORD('your password ') WHERE User='root'; -
I have this problem
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
ERROR 1054 (42S22): Unknown column 'Password' in 'field list' -
My mysql version is 5.7.16,
For those who hasn't solved the problem:
1. Stop MYSQL Server
2. Open terminal and enter: cd /usr/local/mysql/bin/ , then enter your mac password
3. Enter: sudo su
4. Enter: sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
5. Open a new terminal tab and enter: sudo /usr/local/mysql/bin/mysql -u root
6. Enter: UPDATE mysql.user SET authentication_string=PASSWORD('YOUR NEW MYSQL PASSWORD') WHERE User='root';
7. Enter: FLUSH PRIVILEGES;
8.Enter: \q
Hope this might help you, it took me almost half a day to find the solution, and it works just fine to me. -
на 1:34 не коннектится к сиквелу, пишет что не знает команды, что посоветуете
mysql -u root
-bash: mysql: command not found -
For MySQL 5.7 this is useful: https://stackoverflow.com/questions/30692812/mysql-user-db-does-not-have-password-columns-installing-mysql-on-osx
-
hmm.. that is what worked for me. Did you try add sudo to it?
-
After safe mode I get what you got and then I open a new window and run mysql -u root and it says command not found
-
After starting in safe mode and opening a new terminal window, I still was not able to log into mysql. I got ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) . Please help