# 查看MySQL是否启动可以用如下命令 > ps -ef | grep mysqld mysql 1456 1 0 00:50 ? 00:00:20 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid root 19802 16786 0 11:11 pts/2 00:00:00 grep --color=auto mysqld
# 查看防火墙的状态 > systemctl status firewalld.service # 关闭防火墙 > systemctl stop firewalld.service # 禁用防火墙开机自启动 > systemctl disable firewalld.service
# 以下命令,需要在mysql的客户端下执行。设置远程访问权限 > GRANT ALL PRIVILEGES ON *.* TO 'mysql用户名'@'%' IDENTIFIED BY 'mysql的秘密' WITH OPTION; # 刷新权限 > FLUSH PRIVILEGES; >
解决windows宿主机连接vmware虚拟环境的mysql问题。