Enter password:
ERROR 2002 (HY000): Can\\\\\\\\’t connect to local MySQL server through socket \\\\\\\\’/tmp/mysql.sock\\\\\\\\’ (2)
密码输入的自动安装里面的,也就是域名oneinstack
提示上面的,我看/etc/my.conf里面也有这个/tmp/mysql.sock啊,咋回事呢
也不能使用service mysqld restart
ERROR 2002 (HY000): Can\\\\\\\\’t connect to local MySQL server through socket \\\\\\\\’/tmp/mysql.sock\\\\\\\\’ (2)
密码输入的自动安装里面的,也就是域名oneinstack
提示上面的,我看/etc/my.conf里面也有这个/tmp/mysql.sock啊,咋回事呢
也不能使用service mysqld restart
6 Answers
2019-10-28T09:06:45.264837Z 0 [Note] Binlog end
2019-10-28T09:06:45.264913Z 0 [Note] Shutting down plugin 'CSV'
2019-10-28T09:06:45.264923Z 0 [Note] Shutting down plugin 'MyISAM'
2019-10-28T09:06:45.265097Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
这是你说的目录最后的日志,我操作了很多次登录mysql,发现错误在这里面并没有出现记录
2019-10-28T09:06:45.264913Z 0 [Note] Shutting down plugin 'CSV'
2019-10-28T09:06:45.264923Z 0 [Note] Shutting down plugin 'MyISAM'
2019-10-28T09:06:45.265097Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
这是你说的目录最后的日志,我操作了很多次登录mysql,发现错误在这里面并没有出现记录
下面是我刚刚敲的命令
which mysql——》/usr/local/mysql/bin/mysql
service mysqld restart——》MySQL server PID file could not be found! [FAILED]
Starting MySQL..The server quit without updating PID file ([FAILED]sql/mysql.pid).
mysql -uroot -p ——》
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
find / -name mysql.sock——》/tmp/mysql.sock
vim /etc/my.cnf——》
port = 3306
socket = /tmp/mysql.sock
[mysql]
prompt="MySQL [\d]> "
no-auto-rehash
[mysqld]
port = 3306
socket = /tmp/mysql.sock
basedir = /usr/local/mysql
datadir = /data/mysql
pid-file = /data/mysql/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1
.....
which mysql——》/usr/local/mysql/bin/mysql
service mysqld restart——》MySQL server PID file could not be found! [FAILED]
Starting MySQL..The server quit without updating PID file ([FAILED]sql/mysql.pid).
mysql -uroot -p ——》
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
find / -name mysql.sock——》/tmp/mysql.sock
vim /etc/my.cnf——》
port = 3306
socket = /tmp/mysql.sock
[mysql]
prompt="MySQL [\d]> "
no-auto-rehash
[mysqld]
port = 3306
socket = /tmp/mysql.sock
basedir = /usr/local/mysql
datadir = /data/mysql
pid-file = /data/mysql/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1
.....
/tmp/ ll 命令完出现 ——》 mysql.sock -> /var/lib/mysql/mysql.sock
但是在/var/lib/下找不到mysql目录
我觉得问题在这里,就是不知道为何自动安装完毕是这样子
但是在/var/lib/下找不到mysql目录
我觉得问题在这里,就是不知道为何自动安装完毕是这样子
Please login or Register to submit your answer