首页 >数据库 >mysql教程 >遇到mysql不可外连的root的解决方法。

遇到mysql不可外连的root的解决方法。

WBOY
WBOY原创
2016-06-07 16:38:351487浏览

其实就是利用root的权限建立一个%的用户。具体方法: CREATE USER ‘whoami’@%’ IDENTIFIED BY ‘whoamifortest’; GRANT ALL PRIVILEGES ON *.* TO ‘whoami’@%’ IDENTIFIED BY ‘whoamifortest’WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECT

其实就是利用root的权限建立一个%的用户。具体方法:

CREATE USER ‘whoami’@’%’ IDENTIFIED BY ‘whoamifortest’;
GRANT ALL PRIVILEGES ON *.* TO ‘whoami’@’%’ IDENTIFIED BY ‘whoamifortest’WITH GRANT OPTION
MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

最后记得拖完库把建的用户删掉

DROP USER ‘whoami’@’%’;
DROP DATABASE IF EXISTS `whoami` ;

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn