bjxq-cs88

mysql 允许别人远程连接操作步骤

mysql在默认配置下是不允许除本机之外的ip访问的,那如何让mysql能让其他机器访问?

在MysqlWorkBench里执行如下命令

use mysql;

update user set host = \'%\' where user =\'root\';

 

如果控制台输出如下:

update user set host = \'%\' where user =\'root\'        Error Code: 1175. You areusing safe update mode and you tried to update a table without a WHERE thatuses a KEY column To disable safe mode, toggle the option in Preferences ->SQL Editor and reconnect.         0.031sec

那是因为开启了安全模式,关闭安全模式如下所示:

菜单:Edit-Preferences下

 

在SQL Editor页面最下方去掉 Safe Updates的勾选即可。

 

分类:

技术点:

相关文章:

  • 2021-12-20
  • 2021-10-31
  • 2021-11-13
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
猜你喜欢
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
  • 2021-05-23
  • 2022-12-23
  • 2022-01-04
相关资源
相似解决方案