navicat连接linux下的mysql

2018-12-29  本文已影响0人  云之彼端l

操作步骤

保证宿主机与安装mysql的虚拟机能够通信

若是在笔记本的vmware上安装的虚拟机,那么设置网络为仅主机模式,并设置windows VMware Network Adapter VMnet1网卡ip与虚拟机的ip在同一网段即可。

1、连接到mysql服务器

mysql -uroot -p123456 //123456为mysql数据库下root用户的密码

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; //youpassword为mysql数据库下root用户的密码

mysql> FLUSH PRIVILEGES;


mysql> \q //退出mysql数据库

2、关闭防火墙

[root@localhost ddc]# service firewalld stop
Redirecting to /bin/systemctl stop  firewalld.service
[root@localhost ddc]# chkconfig firewalld off
Note: Forwarding request to 'systemctl disable firewalld.service'.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

3、使用navicat连接测试

上一篇下一篇

猜你喜欢

热点阅读