【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
确保my.cnf里面
[client]
socket = xxxxxxxxxxxx
和
[mysqld]
一致,并且没遗漏
加上上面的话
# source /etc/my.cnf
-bash: [mysqld]: command not found
-bash: symbolic-links=0: command not found
-bash: [client]: command not found
-bash: socket: command not found
-bash: [mysqld_safe]: command not found
-bash: log-error=/var/log/mysqld.log: 没有那个文件或目录
-bash: pid-file=/var/run/mysqld/mysqld.pid: 没有那个文件或目录
你客户端提示是去连 /tmp/mysql.sock
你看看你的配置的socket配的明显不对应.
可以试试 mysql -u XXX -p -S /var/lib/mysql/mysql.sock
来人帮帮我啊 ......
确实问题有点怪 本地不能访问 但是远程可以
确实是这个问题 谢谢你了 解决了
我把/tmp/mysql.sock换成了 /var/lib/mysql/mysql.sock的软连接 就好使了
本地不能访问的原因是可能是没有给用户本地访问的权限 (Host字段值为%) 请问%不是万能的吗
引用来自“李明泽”的答案
引用来自“勇者天空”的答案
确保my.cnf里面
[client]
socket = xxxxxxxxxxxx
和
[mysqld]
socket = xxxxxxxxxxxx
一致,并且没遗漏
加上上面的话
# source /etc/my.cnf
-bash: [mysqld]: command not found
-bash: symbolic-links=0: command not found
-bash: [client]: command not found
-bash: socket: command not found
-bash: [mysqld_safe]: command not found
-bash: log-error=/var/log/mysqld.log: 没有那个文件或目录
-bash: pid-file=/var/run/mysqld/mysqld.pid: 没有那个文件或目录
你客户端提示是去连 /tmp/mysql.sock
你看看你的配置的socket配的明显不对应.
可以试试 mysql -u XXX -p -S /var/lib/mysql/mysql.sock
来人帮帮我啊 ......
确实问题有点怪 本地不能访问 但是远程可以
确保my.cnf里面
[client]
socket = xxxxxxxxxxxx
和
[mysqld]
socket = xxxxxxxxxxxx
一致,并且没遗漏
引用来自“勇者天空”的答案
确保my.cnf里面
[client]
socket = xxxxxxxxxxxx
和
[mysqld]
socket = xxxxxxxxxxxx
一致,并且没遗漏
加上上面的话
# source /etc/my.cnf
-bash: [mysqld]: command not found
-bash: symbolic-links=0: command not found
-bash: [client]: command not found
-bash: socket: command not found
-bash: [mysqld_safe]: command not found
-bash: log-error=/var/log/mysqld.log: 没有那个文件或目录
-bash: pid-file=/var/run/mysqld/mysqld.pid: 没有那个文件或目录
引用来自“大东哥”的答案
引用来自“李明泽”的答案
引用来自“勇者天空”的答案
确保my.cnf里面
[client]
socket = xxxxxxxxxxxx
和
[mysqld]
socket = xxxxxxxxxxxx
一致,并且没遗漏
加上上面的话
# source /etc/my.cnf
-bash: [mysqld]: command not found
-bash: symbolic-links=0: command not found
-bash: [client]: command not found
-bash: socket: command not found
-bash: [mysqld_safe]: command not found
-bash: log-error=/var/log/mysqld.log: 没有那个文件或目录
-bash: pid-file=/var/run/mysqld/mysqld.pid: 没有那个文件或目录
你客户端提示是去连 /tmp/mysql.sock
你看看你的配置的socket配的明显不对应.
可以试试 mysql -u XXX -p -S /var/lib/mysql/mysql.sock
确实是这个问题 谢谢你了 解决了
我把/tmp/mysql.sock换成了 /var/lib/mysql/mysql.sock的软连接 就好使了
本地不能访问的原因是可能是没有给用户本地访问的权限 (Host字段值为%) 请问%不是万能的吗
引用来自“大东哥”的答案