How to Change MySQL root password on Mac OS

preview_player
Показать описание
Short video describing how I was changing my lost MySQL root password on Mac OS X (Mavericks)
Feel free to ask in a comments if you have any questions left.
Рекомендации по теме
Комментарии
Автор

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 --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 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.

handsomegod
Автор

When I put in my password (1:17) it doesnt work, returns command not found

juniorpena
Автор

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

dcidrummer
Автор

after I type the first sudo command, it shows mysqld_safe command not found. Please help how to do this.

AnshMehraa
Автор

Great! Thanks, Igor! Correct String is: UPDATE mysql.user SET WHERE User='root’;

Levcandy
Автор

на 1:34 не коннектится к сиквелу, пишет что не знает команды, что посоветуете
mysql -u root
-bash: mysql: command not found

ДанилПочта
Автор

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.

Sharkcode
Автор

I'm getting a "mysqld_safe: command not found" message

gplus
Автор

Thank you very much!. But now in new version of my sql you need this: update user set where user='root';

hermanfrancoaguirrejofre
Автор

Note, the column is not called Password anymore but 'authentication_string.

danielebeling
Автор

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)

EPrimeify
Автор

Hi. what if I forgot my password and it is not working?
Any way of recovering or changing password without logging in?

CrystalJoy
Автор

Great!!! thanks a lot for the tutorial, solved my trouble ...

vlaslov-ti
Автор

hmm.. that is what worked for me. Did you try add sudo to it?

ИгорьТ-хм
Автор

Thank you so much...this is done completely

parinpanjari
Автор

sudo mysqld_safe --skip-grant-tables
Password:
Sorry, try again.
when i wrote that, i get it. can anyone help me please

rafailmahammadli
Автор

please take down this video it doesn't solve the problem, the user would get a "command not found error"

DirectorMimi
Автор

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!

FRIENDSofCAP