日期:2014-05-16 浏览次数:20752 次
当你使用客户端连接linux主机的mysql数据库,当不允许你连接时。进行如下设置,客户端即可正常连接。 ? 必须在mysql中修改 即 mysql> ? 将下面的‘ServerIP’改为交互系统部署的服务器ip 将下面的‘youIP’改为您电脑的ip nisuser表示要连接的数据库登陆名称 nis表示要连接的数据库登陆密码 ? GRANT ALL PRIVILEGES ON *.* TO nisuser@ServerIP IDENTIFIED BY 'nis' WITH GRANT OPTION; ? GRANT ALL PRIVILEGES ON *.* TO nisuser@youIP IDENTIFIED BY 'nis' WITH GRANT OPTION; ? FLUSH PRIVILEGES; ? ? 样例: GRANT ALL PRIVILEGES ON *.* TO root@10.1.2.141 IDENTIFIED BY 'founder123' WITH GRANT OPTION; ? GRANT ALL PRIVILEGES ON *.* TO root@10.1.8.4 IDENTIFIED BY 'founder123' WITH GRANT OPTION; ? FLUSH PRIVILEGES;