零,报错日志 2002-Can't connect to server on'106.54.209.77'(1006x)
今天差点被这个报错给折磨疯掉
尝试一:对腾讯云服务器进行更改
尝试二:针对配置文件处理
step1
c++
//确保注释 /etc/mysql/mysql.conf.d/mysqld.cnf 下# bind-address = 127.0.0.1# mysqlx-bind-address = 127.0.0.1
step2 重新加载服务器配置文件
c++
sudo systemctl daemon-reload
step3
c++
sudo systemctl restart mysql
尝试三:开启MySQL的远程访问权限
c++
USE mysql;
CREATE USER 'root'@'%' IDENTIFIED BY '密码';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
select user,host from user;
顺便对于vscode
顺便今天似乎vscode连接不上ubuntu,是因为乱处理上面的问题,给出如下方法
c++
sudo ufw enable
#Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
#Firewall is active and enabled on system startup