不行呀!提示: mysql> use mysql; ERROR 1044: Access denied for user: '@localhost' to database 'mysql' mysql>
我想把mysql的root用户的密码改为空?如何操作?
你的权限不够,把root密码设置为空,只要修改mysql.user表中的password字段
以拥有grant权限的用户名连接mysql server,然后用这个命令即可: mysql>grant all on *.* to 'root'@'localhost';也可以设置你想要的密码: mysql>grant all on *.* to 'root'@'localhost' identified by 'yourpassword';当然最好把grant权限也赋予root,用这个命令: mysql>grant all on *.* to 'root'@'localhost' with grant option;别忘记加分号;
mysql> use mysql;
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
mysql>
mysql>grant all on *.* to 'root'@'localhost';也可以设置你想要的密码:
mysql>grant all on *.* to 'root'@'localhost' identified by 'yourpassword';当然最好把grant权限也赋予root,用这个命令:
mysql>grant all on *.* to 'root'@'localhost' with grant option;别忘记加分号;