Log: mysql -uroot -p
配置:path:PATH=“$PATH”:/usr/local/mysql/bin
reset Password:
// command files into the database
cd /usr/local/mysql/bin
// skip the certification authority
sudo ./mysqld_safe --skip-grant-tables
The other from the terminal:
// execute mysql command
/usr/local/mysql/bin/mysql
// enter the name <mysql> Database
use mysql
// refresh permission
flush privileges;
// change Password
password for SET 'the root' @ 'localhost' = password ( 'new password');
// Exit mysql
exit
1. Start mysql service
sudo /usr/local/mysql/support-files/mysql.server start
2. Stop mysql service
sudo /usr/local/mysql/support-files/mysql.server stop
3. Restart mysql service
sudo /usr/local/mysql/support-files/mysql.server restart