设置mysql密码:
mysql
use mysql;
UPDATE user SET password=PASSWORD('123456') WHERE user='root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
grant all privileges on *.* to 'root'@'%' identified by '123456';
quit