//使用root登录,录入命令后按回车键,然后录入密码 mysql -u root -p //修改MySQL数据库root用户密码 alter USER 'root'@'localhost' IDENTIFIED BY 'nitdDHpassword6***'; //授权远程登录 show databases; use mysql; select host, user, authentication_string, plugin from user; update user set host = "%" where user='root'; select host, user, authentication_string, plugin from user; flush privileges;