以用户“mysql”身份运行 mysql 守护进程时出现奇怪的错误,这是命令输出的结果,现在我已检查过,实例尚未运行:S 所以,我不知道为什么它会显示这个输出:
120729 18:54:28 [Note] Plugin 'FEDERATED' is disabled.
120729 18:54:28 InnoDB: The InnoDB memory heap is disabled
120729 18:54:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120729 18:54:28 InnoDB: Compressed tables use zlib 1.2.5
120729 18:54:28 InnoDB: Using Linux native AIO
120729 18:54:28 InnoDB: Initializing buffer pool, size = 128.0M
120729 18:54:28 InnoDB: Completed initialization of buffer pool
120729 18:54:28 InnoDB: highest supported file format is Barracuda.
120729 18:54:28 InnoDB: Waiting for the background threads to start
120729 18:54:29 InnoDB: 1.1.8 started; log sequence number 2929794
120729 18:54:29 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120729 18:54:29 [Note] - '0.0.0.0' resolves to '0.0.0.0';
120729 18:54:29 [Note] Server socket created on IP: '0.0.0.0'.
120729 18:54:29 [ERROR] Can't start server : Bind on unix socket: No such file or directory
120729 18:54:29 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
120729 18:54:29 [ERROR] Aborting
120729 18:54:29 InnoDB: Starting shutdown...
120729 18:54:30 InnoDB: Shutdown completed; log sequence number 2929794
120729 18:54:30 [Note] mysqld: Shutdown complete
非常感谢您的帮助,谢谢大家!
答案1
错误信息中的问题很明显:
120729 18:54:29 [ERROR] Can't start server : Bind on unix socket: No such file or directory
120729 18:54:29 [ERROR] Do you already have another mysqld server running on socket: /var/mysql/mysql.sock ?
最有可能的是,该套接字实际上并不存在。这可能是一个简单的打字错误。
默认情况下,套接字位于/var/lib/mysql/mysql.sock
Fedora 框中。因此,在您的/etc/my.cnf
文件中,您应该有:
socket=/var/lib/mysql/mysql.sock