Can't connect to MySQL server on localhost (10061)这个就属于下面要说的情况 启动服务 systemctl start mariadb.service systemctl enable mariadb.service systemctl stop mariadb.service 1.首先开启mysql权限 设置ROOT密码 mysqladmin -u root password '888888' mysql -u root -p use mysql