当前位置: 代码迷 >> 综合 >> centos7下lnmp1.4一键安装包(https://lnmp.org/install.html)mysql5.7授权远程连接
  详细解决方案

centos7下lnmp1.4一键安装包(https://lnmp.org/install.html)mysql5.7授权远程连接

热度:62   发布时间:2023-12-04 18:57:06.0

Mysql操作命令 :

mysql -uroot -pshow databases;use mysql;show tables;select host,user from user;

使用mysql数据库(真正的数据库,而非数据库软件),将所有数据库的所有表(*.*)的所有权限(all privileges),授予通过任何ip(%)访问的root用户,密码为123456,最后刷新(flush privileges)即可

grant all privileges on *.* to 'root'@'%' identified by '123456';flush privileges;

有防火墙的点此链接
  相关解决方案