How To Change Mysql Password

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

How to change mysql password

$ mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
mysql> flush privileges;

mysql> quit



sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop|start|restart


add to path in console
but after install mysql in mavericks, you need to check the right folder.
Edit and add the new path.
sudo nano ~/.bash_profile

export PATH="/usr/local/mysql/bin:$PATH"
in .bashrc or .bash_profile file (cd ~/.bash_profile)
after you need to
$ mysql -u root p (enter) and enter the password.

You might also like