mysql设置数据库密码常用的有四种方法:
1.用root 登陆MySQL终端
mysql>set password =password(‘raykaeso‘);
mysql>flush privileges;
2.在MySQL终端中使用GRANT语句
mysql>grant all on *.* to ‘root’@’localhost’ IDENTIFIED BY ‘raykaeso’with grant option ;
mysql>flush privileges;
3.在MySQL库user表中直接修改
mysql>use mysql;
mysql>update user set password=password(‘raykaeso’) where user=’root';
mysql>flush privileges;
4、在shell命令行里修改MySQL用户密码
[root@raykaeso leixuesong] mysqladmin -u root password “your password”;