mysql 我把root的select关了。怎么在打开啊。请教一下
点那个管理使用者会出现1142 - select command denied to user 'root'@'localhost' from table 'user'
谢谢
点那个管理使用者会出现1142 - select command denied to user 'root'@'localhost' from table 'user'
谢谢
grant all privileges on *.* to root@'%' identified by "Passwd"
Garnt select on *.* to root@'localhost'
Grant select on *.* to root@'localhost'
可以看看http://blog.chinaunix.net/u3/116107/showart.php?id=2275557如果有其他的用户有GRANT权限,那么用有权限的用户登录,再执行GRANT SELECT ....的操作。
grant all on *.* to 'root'@'localhost'
-> Grant select on *.* to root@'%' ;
Grant select on *.* to root@'localhost'
ERROR 2013 : Lost connection to MySQL server during query
->
-> Grant all on *.* to 'root'@'localhost'
->
-> Grant all on *.* to 'root'@'localhost';
ERROR 2013 : Lost connection to MySQL server during query
mysql>
出这个东西
或则
grant Create,Select on *.* to 'root'@'localhost';
grant Create,Select on *.* to 'root'@'%'
grant Create,Select on *.* to 'root'@'localhost';2:
grant Create,Select on *.* to 'root'@'%';----------------------------------
3:
grant all on *.* to 'root'@'localhost';
4:
grant all on *.* to 'root'@'%';
1,2一种方法。3,4一种方法。
ERROR 2013 : Lost connection to MySQL server during query
mysql> grant Create,Select on *.* to 'root'@'%';
ERROR 2013 : Lost connection to MySQL server during query
mysql> grant Create,Select on *.* to 'root'@'%'
-> ;
ERROR 1045 : Access denied for user 'root'@'localhost' (using password: YES)
mysql> grant Create,Select on *.* to 'root'@'localhost';ERROR 1045 : Access denied for user 'root'@'localhost' (using password: YES)
mysql> grant Create,Select on *.* to 'root'@'%';ERROR 1045 : Access denied for user 'root'@'localhost' (using password: YES)
mysql> grant all on *.* to 'root'@'localhost';ERROR 1045 : Access denied for user 'root'@'localhost' (using password: YES)
mysql> grant all on *.* to 'root'@'%';ERROR 1045 : Access denied for user 'root'@'localhost' (using password: YES)
mysql>
你说的我试过了啊。不行呀。是哪里的问题呀
grant all on *.* to root@'%' identified by '密码';用上面这2条把密码重置下,看看
1:用root 登入mysql 创建一个帐号:
grant all on *.* to new_user@localhost identified by '密码' with grant option;
2:用new_user这个帐号登入:
drop user root@'localhost';
flush privileges;
grant all on *.* to root@localhost identified by '123456' with grant option;
3:用root登入:
drop user new_user@'localhost';
flush privileges;-----试下看看