解决虚拟机linux端mysql数据库无法远程访问

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

mysql -uroot -p
Enter password: 
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'sy31214' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;