navicat localhost可连mysql但无法用ip连接

 时间:2024-10-15 02:29:05

1、Windows的mysql:解决办法:C:\Users\Administrator>net start mysqlC:\Users\Administrator>mysql -uroot -p1234注:-p后面的1234是密码,注意修改。

2、赋予所有用户远程连接权限:mysql>grant all privileges on *.* to 'root'@'%' identified by '1234';

navicat localhost可连mysql但无法用ip连接

3、解释:*.*:表示 所有数据库.所有表%:所有ipby后面为数据库密码,注意按实际修改。刷新配置:mysql>flush privileges;湔溴亍腧退回cmd命令行:mysql>quit;重新启动mysql:C:\Users\Administrator>net stop mysqlC:\Users\Administrator>net start mysql

4、CentOs lampp mysql:解谛忖认噤决办法:进入mysql命令行:[root@Master bin]# /opt/lampp/bin/mysql -uroot -p呶蓟鹭毵Enter password:Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 7Server version: 10.1.32-MariaDB Source distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]>

5、进入mysql web管理界面,浏览器输入:ip/phpadmin修改mysql数据库中User表里面root用户的%字段的密码为123456,赋予所有用户远程登录权限:MariaDB [(none)]>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;刷新配置:MariaDB [(none)]>FLUSH PRIVILEGES;命令退出mysql:MariaDB [(none)]>quit;重启服务:/opt/lampp/lampp restart

6、这时候采用navicat等工具就可以远程连接并操作数据库了。

7、over!大功告成啦

  • Linux Centos 6.5 安装流程图解
  • 如何使用VS2012调试QT程序
  • maven打war包xml,properties配置文件没有打进去
  • oracle怎么生成ADDM报告
  • 图解WIN7下创建ODBC数据源到SQL Server新数据源
  • 热门搜索
    葡萄种植技术大全 虎皮鱼怎么养 过敏性哮喘怎么治疗 玛卡泡酒配方大全 于蓝个人资料简介 小孩动画片大全 绰号大全 电脑怎么设置wifi 樱桃图片大全 羊角蜜甜瓜怎么吃