mysql h 127.0.0.1,MySQL 连接时尽量使用 127.0.0.1 而不是 localhost
原因Wheneveryouspecify"localhost"or"localhost:port"asserver,theMySQLclientlibrarywilloverridethisandtrytoconnecttoalocalsocket(namedpipeonWindows).IfyouwanttouseTCP/IP,use"127.0.0.1"insteadof"localhost"