mysql -uroot -p #然后输入你的密码进入mysql->状态 alter user user() identified by “你的密码” SET PASSWORD FOR 'root'@'localhost' = PASSWORD('你的密码'); CREATE DATABASE physical_prod; USE physical_prod; #执行备份好的sql语句 source /root/physical_prod202341.sql; SHOW TABLES; 重点!!!!! GRANT ALL PRIVILEGES ON *.* TO 'root'@'放jar包的服务器ip' IDENTIFIED BY '你的密码' WITH GRANT OPTION;