无法使用 XAMPP 启动 MySQL

无法使用 XAMPP 启动 MySQL

我尝试使用 XAMPP 启动 mysql,但没有成功。Apache 运行正常,但尝试启动 mysql 时显示无法启动 MySQL!

这是日志

130408 11:07:05 mysqld_safe Starting mysqld daemon with databases from /u01/lampp/lampp/var/mysql
130408 11:07:05 [Note] Plugin 'FEDERATED' is disabled.
130408 11:07:05 InnoDB: The InnoDB memory heap is disabled
130408 11:07:05 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
130408 11:07:05 InnoDB: Compressed tables use zlib 1.2.3
130408 11:07:05 InnoDB: Initializing buffer pool, size = 128.0M
130408 11:07:05 InnoDB: Completed initialization of buffer pool
130408 11:07:05 InnoDB: highest supported file format is Barracuda.
130408 11:07:05  InnoDB: Waiting for the background threads to start
130408 11:07:06 InnoDB: 1.1.8 started; log sequence number 1595675
130408 11:07:06 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130408 11:07:06 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130408 11:07:06 [Note] Server socket created on IP: '0.0.0.0'.
130408 11:07:06 [ERROR] Can't start server : Bind on unix socket: No such file or directory
130408 11:07:06 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
130408 11:07:06 [ERROR] Aborting

130408 11:07:06  InnoDB: Starting shutdown...
130408 11:07:06  InnoDB: Shutdown completed; log sequence number 1595675
130408 11:07:06 [Note] /u01/lampp/lampp/sbin/mysqld: Shutdown complete

130408 11:07:06 mysqld_safe mysqld from pid file /u01/lampp/lampp/var/mysql/JOOMLA.pid ended

in my.cnf says:
socket      = var/lib/mysql/mysql.sock

你有什么主意吗?

提前致谢。

答案1

问题很简单Can't start server : Bind on unix socket: No such file or directory,这意味着您没有设置正确的路径或配置的路径不存在或您没有足够的权限。

检查是否存在 mysql 所需的目录结构,以及您用来运行 mysql 的用户是否对这些目录具有足够的权限。当 mysql 停止时,文件 *.sock 和 *.pid 不应该存在。

相关内容