mysql8.0.18版本
配置远程访问1
1.E:\WAMP\bin\mysql\mysql8.0.18\my.ini
找到
[mysqld]
default_authentication_plugin=mysql_native_password
port = 3307
方法一:(如果有这行,就添加#注释,或者改成skip-name-resolve)
#bind-address = 127.0.0.1
方法二:(添加bind-address = 0.0.0.0)
bind-address = 0.0.0.0
skip-grant-tables
bind-address 服务监听在127.0.0.1和0.0.0.0上的区别:
0.0.0.0在服务器的环境中,指的就是服务器上所有的ipv4地址
- 3307端口监听在127.0.0.1,只有本机客户端可以访问,其他服务器无法访问
- 3307端口监听在0.0.0.0上,如果没有端口限制,那么其他服务器则可以连接该服务器的该端口
2.E:\WAMP\apps\phpmyadmin4.9.2\config.inc.php
if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
$i++;
if($mariaFirst) $i++;
$cfg['Servers'][$i]['verbose'] = 'MySQL';
$cfg['Servers'][$i]['host'] =