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.
Thanks a lot it worked , but now sure why my updated password showed as expired. and i had to launch Workbench to set a new one. thanks a lot you saved my day
I don't have the password, after entering the following command "sudo mysqld_safe --skip-grant-tables;", I couldn't do anything as I don't have the password, I have just installed mysql and don't know the default password.
How am I supposed to log into MYSQL if trhe server is turned off? ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Hello Andriy, thanks for the correction. What do I have to type after I update the password? The Bash terminal just returns on screen '> but it does not notify me that the password has been successfully changed
That is happening because in the video, that guy has register the path of mysql's bin folder in his bash profile file, so that's why he can just call it without the folder path of the command
Hey Igor, can you please help me with this? I download mysql and didn't write down temporary password. I entered your code it took me to password(as you said computer password) but i enter my computer password it gives me error. sudo mysql_safe --skip-grant-tables Password: sudo: mysql_safe: command not found
nothing worked for me. But then i downloaded MAMP which has a MAMP pro version as well. However, i use the simple MAMP that comes MySQL and APAche server. so been developing my website locally using that. try it. I hope it works for you too. Sorry for late reply, man!
Dude!!! Your killing me here... WHy don't you do a video where you can read the freak'n text on the terminal screen and quit assuming that the small ass text which is pixelated on the video is imposible to read.. or at least say outloud what noone can read!
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.
Thanks a lot it worked , but now sure why my updated password showed as expired. and i had to launch Workbench to set a new one. thanks a lot you saved my day
glad to help :D
what did error message say?
no just enter this cd /usr/local/mysql/bin/
and then there should be a key icon to let you enter your mac password
did you change installation path while installing sql ?
When I put in my password (1:17) it doesnt work, returns command not found
Thank you, this was a life saver!
Great!!! thanks a lot for the tutorial, solved my trouble ...
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
Thank you so much...this is done completely
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';
Thank you bro! ❤️ from China
Note, the column is not called Password anymore but 'authentication_string.
I don't have the password, after entering the following command "sudo mysqld_safe --skip-grant-tables;", I couldn't do anything as I don't have the password, I have just installed mysql and don't know the default password.
на 1:34 не коннектится к сиквелу, пишет что не знает команды, что посоветуете
mysql -u root
-bash: mysql: command not found
How am I supposed to log into MYSQL if trhe server is turned off?
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Hi. what if I forgot my password and it is not working?
Any way of recovering or changing password without logging in?
thank you :)
Great! Thanks, Igor! Correct String is: UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE User='root’;
Hello Andriy, thanks for the correction. What do I have to type after I update the password? The Bash terminal just returns on screen '> but it does not notify me that the password has been successfully changed
Us showing ur SQL syntax is incorrect; near '('passoword') where User= ' root''
after I type the first sudo command, it shows mysqld_safe command not found. Please help how to do this.
Me too! Help!
yes me too i had the same problem@@adamh9271
Tx bro
Excelent video
I'm getting a "mysqld_safe: command not found" message
Try entering this instead:
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
That is happening because in the video, that guy has register the path of mysql's bin folder in his bash profile file, so that's why he can just call it without the folder path of the command
im getting try again
BRO IS WEAR TO GOD I CANT GO INTO MYSQL -U ROOT WHY DOES THIS VIDEO EXIST???
hmm.. that is what worked for me. Did you try add sudo to it?
Hey Igor,
can you please help me with this? I download mysql and didn't write down temporary password. I entered your code it took me to password(as you said computer password) but i enter my computer password it gives me error.
sudo mysql_safe --skip-grant-tables
Password:
sudo: mysql_safe: command not found
hey Oruj,
Even am stuck with the same issue. Have you found a solution?
nothing worked for me. But then i downloaded MAMP which has a MAMP pro version as well. However, i use the simple MAMP that comes MySQL and APAche server. so been developing my website locally using that. try it. I hope it works for you too. Sorry for late reply, man!
sudo mysqld_safe --skip-grant-tables
Password:
Sorry, try again.
when i wrote that, i get it. can anyone help me please
i got same problem
plz let me know how u solved
please take down this video it doesn't solve the problem, the user would get a "command not found error"
Dude!!! Your killing me here... WHy don't you do a video where you can read the freak'n text on the terminal screen and quit assuming that the small ass text which is pixelated on the video is imposible to read.. or at least say outloud what noone can read!
stfu we can all read