windows mysql8 常用设置

select user,host,plugin from user;

alter user 'root'@'localhost' identified with mysql_native_password by 'master$1234';

2.允许任何IP远程连接

update user set Host='%' where User='root'; 

5.进行指令刷新

flush privileges; 

6、重启mysql

service mysql restart

 

 

一、判断Ubuntu是否开启防火墙

sudo ufw status

开放防火墙3306端口

sudo ufw allow 3306

二、查看3306端口是否打开

三、修改mysql配置文件,将bind-address = 127.0.0.1注释,开放所有连接

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 

重启ubuntu,再次查看3306端口状态,同第二步

四、通过telnet尝试连接mysql

telnet your-remote-ip-address 3306

posted on 2023-12-21 19:48  zyp_java_net  阅读(24)  评论(0编辑  收藏  举报

导航