当前位置:网站首页>Solution to the problem that the root account of MySQL database cannot be logged in remotely

Solution to the problem that the root account of MySQL database cannot be logged in remotely

2022-07-06 03:59:00 Terence full stack development

Recently, after a new Tencent cloud server , Installed through the pagoda panel mysql database , Then use root User pass navicat Remote connection login failed .

The solution is as follows Two lines of code ok
MySQL5.7 and MySql8 Turn on root User remote access

mysql> create user 'root'@'%' identified by '1234';
Query OK, 0 rows affected (0.02 sec)
	
mysql> grant all on *.* to 'root'@'%';
Query OK, 0 rows affected (0.02 sec)

 Insert picture description here

原网站

版权声明
本文为[Terence full stack development]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060352467704.html