腾讯云mysql数据库实现远程连接记录

遇到的问题

  1. 腾讯云默认3306端口是不开放的需要去安全组->入站规则开发端口
  2. 给mysql开放远程链接设置之后,需要重启
vim /etc/mysql/mysql.conf.d/mysqld.cnf
注释掉 bind-address = 127.0.0.1

进入mysql
mysql -u username -p

grant all on *.* to username@'%' identified by 'password';

flush privileges;
exit;
退出mysql,重启mysql
sudo /etc/init.d/mysql restart

参考:
https://blog.csdn.net/skh2015java/article/details/80152669
https://www.jianshu.com/p/61798dbcef58

你可能感兴趣的:(腾讯云mysql数据库实现远程连接记录)