我在发射时遇到问题 MySQL
在我的本地机器上。每次尝试启动示例时,我都会得到:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
为了创建所需的文件,我遵循这个解决方案更改目录 /var/lib/...
至 /var/run/...
因为我的配置就是这样设置的。奇怪的是,当我按照所描述的步骤操作时,进程启动了,我可以访问我的数据库,但过了一段时间,它突然停止,文件(mysqld.sock和mysqld.pid)消失了。这怎么可能?怎样才能避免它的发生?
我电脑上的设置 50-server.cnf
我的 mariadb
是:
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = localhost
暂无答案!
目前还没有任何答案,快来回答吧!