美文网首页
MySql root 修改 远程访问权限

MySql root 修改 远程访问权限

作者: se7en__ | 来源:发表于2017-02-22 18:11 被阅读0次

两种方法

  • Grant privileges. As root user execute:

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
    
  • bind to all addresses:
    The easiest way is to comment out the line in your my.cnf file:

    #bind-address = 127.0.0.1 
    and restart mysql
    
    service mysql restart
    

MySql 5.7 简单密码禁止修改的问题

create a six character password in mysql 5.7
It's possible to entirely disable the password "plugin" that seems overly strict by running the following: uninstall plugin validate_password

Should you need it again you can turn it back on via: INSTALL PLUGIN validate_password SONAME 'validate_password.so'

Optionally, you could disable it, set your password and re-enable it:


uninstall plugin validate_password;
CREATE USER 'newsier'@'localhost' IDENTIFIED BY 'special';
INSTALL PLUGIN validate_password SONAME 'validate_password.so';

Further reading:
https://dev.mysql.com/doc/refman/5.7/en/server-plugin-loading.html
https://dev.mysql.com/doc/refman/5.7/en/validate-password-plugin-installation.html

相关文章

网友评论

      本文标题:MySql root 修改 远程访问权限

      本文链接:https://www.haomeiwen.com/subject/dfvmwttx.html