fuiou_cary 发表于 2014-10-28 17:36 ![]()
看一下ps -ef | grep mysqld输出
我采用如下方法解决了,可以正常登陆。
root@*****-VirtualBox:~# mkdir /var/run/mysqld
root@*****-VirtualBox:~# ln -s /tmp/mysql.sock /var/run/mysqld/mysqld.sock root@*****-VirtualBox:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. ...... ...... .......
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ ---->4 个默认的数据库
当我用 127.0.0.1 登陆查看数据库,竟然只有 2 个数据库了,这是为什么? mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | test | +--------------------+
请教,为什么用localhost登陆会显示 4个完整的数据库,而用 127.0.0.1登陆时,只显示 2 个数据库?
|