连接docker中的mysql5.5

需要指定地址和端口,若地址是本地IP则要写成127.0.0.1而不能写成localhost

mysql -u root -P 3306 -h 127.0.0.1 -p

你可能感兴趣的:(docker)