远程登录mysql 命令 命令 mysql -h <mysql服务器所在ip地址> -P <端口,通常是3306 > -u <登录mysql的用户名> -p 使用以上命令,然后输入密码即可。 例如: mysql -h 255.255.255.255 -P 3306 -u root -p