我在尝试连接到 mysql 时遇到了大问题.当我跑步时:
I am having a big problem trying to connect to mysql. When I run:
/usr/local/mysql/bin/mysql start
我有以下错误:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)
我在 /var/mysql 目录下有 mysql.sock.
在 /etc/my.cnf 我有:
[client]
port=3306
socket=/var/mysql/mysql.sock
[mysqld]
port=3306
socket=/var/mysql/mysql.sock
key_buffer_size=16M
max_allowed_packet=8M
在 /etc/php.ini 我有:
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket = /var/mysql/mysql.sock
我已经使用 sudo/opt/local/apache2/bin/apachectl restart
但我仍然有错误.
否则,我不知道这是否相关,但是当我执行 mysql_config --sockets 我得到
Otherwise, I don't know if that's relevant but when I do mysql_config --sockets I get
--socket [/tmp/mysql.sock]
确保你正在运行 mysqld : /etc/init.d/mysql start
Make sure you are running mysqld : /etc/init.d/mysql start
这篇关于无法通过 socket '/var/mysql/mysql.sock' 连接到本地 MySQL 服务器 (38)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为