Virtual machine environment: Port 192.168.0.140
本地可以连接使用这个端口
有密码
使用navicat 工具可以进入mysql 服务
The virtual machine uses mysql -uroot -p
Entered the mysql service and found that the database connected above was not the same database! ,
And the password is empty
There is no mysql table inside either
So I suspected that two mysql services were installed
Then I found the data directory in phpstudy
Inside is the data I used to connect to the database using 192.168.0.140
What should I change so that mysql -uroot -p
also points to this directory, or do I need to move the data directory?
Sir, the same port cannot be monitored at the same time. Since 2 MySQLs are installed on different machines at the same time, why do you have to omit the host when linking? If you really want to be lazy, I suggest you just write a shell