Windows 客户端连接 远程Ubuntu linux mysql server 步骤
1. 安装 mysql : sudo apt-get install mysql-server
2. 打开linux 3306 端口
sudo netstat -an|grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
vi /etc/mysql/my.cnf
# bind-address = 127.0.0.1 注释
bind-address = 192.168.1.210
3. 打开远程访问mysql服务器
授权法:
grant all privileges on *.* to 'root'@'192.168.1.210' identified by 'hadoop';
Query OK, 0 rows affected (0.02 sec)
改表法:
mysql -u root -pvmwaremysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
4. 重启 mysql
sudo /etc/init.d/mysql restart
Reference:
Linux下如何启用MySQL数据库远程访问
Ubuntu Linux中开启MySQL远程访问功能
linux下 解决MySQL不允许从远程访问的方法
相关推荐
Gexrior 2020-10-22
emmm00 2020-11-17
王艺强 2020-11-17
aydh 2020-11-12
世樹 2020-11-11
zry 2020-11-11
URML 2020-11-11
spurity 2020-11-10
yifangs 2020-10-13
Andrea0 2020-09-18
Ida 2020-09-16
ltd00 2020-09-12
tufeiax 2020-09-03
xjd0 2020-09-10
greatboylc 2020-09-10
adsadadaddadasda 2020-09-08
疯狂老司机 2020-09-08
CoderToy 2020-11-16
ribavnu 2020-11-16