How to change root in mysql under osx

For this error, RROR 1820 (HY000), is limited to the initial password situation:

Highlights of this record

 

1. Open the terminal, execute ./mysql -u root -p in the mysql installation directory /bin/    , prompt for a password, use the initial password when installing root to log in

 

2.mysql> SET PASSWORD = PASSWORD('newpass');

Query OK, 0 rows affected, 1 warning (0.00 sec)

 

3. After that, you can use the client jdbc to connect

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326757181&siteId=291194637