全新 12.04 安装-mySQL 无法启动

全新 12.04 安装-mySQL 无法启动

我有一个新安装的 Ubuntu 12.04 x64 服务器,并且从其官方存储库安装了 Percona 服务器。

问题是它无法启动!

mysql-error.log 没有显示任何明显内容。

121129 12:16:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/
121129 12:16:54 [Note] Plugin 'FEDERATED' is disabled.
121129 12:16:54 InnoDB: The InnoDB memory heap is disabled
121129 12:16:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121129 12:16:54 InnoDB: Compressed tables use zlib 1.2.3
121129 12:16:54 InnoDB: Using Linux native AIO
121129 12:16:54 InnoDB: Initializing buffer pool, size = 12.0G
121129 12:16:54 InnoDB: Completed initialization of buffer pool
121129 12:16:54 InnoDB: highest supported file format is Barracuda.
121129 12:16:55  InnoDB: Waiting for the background threads to start
121129 12:16:56 Percona XtraDB (http://www.percona.com) 1.1.8-rel29.1 started; log sequence number 1598476
121129 12:16:56 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121129 12:16:56 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121129 12:16:56 [Note] Server socket created on IP: '0.0.0.0'.
121129 12:16:56 [Note] Event Scheduler: Loaded 0 events
121129 12:16:56 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.28-29.1-log'  socket: '/var/run/mysqld/mysql.sock'  port: 3306  Percona Server (GPL), Release 29.1
121129 12:16:56 [Note] Event Scheduler: scheduler thread started with id 1

并且系统日志显示...

Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: 

正在创建套接字文件,我可以使用以下方式访问服务器:

mysql -h 127.0.0.1 -P 3306 -u root --p密码

答案1

你是真的确定你没有动过任何配置吗?我发现了这一点:

socket: '/var/run/mysqld/mysql.sock' (server log)

socket '/var/run/mysqld/mysqld.sock' (syslog)

我想你现在也明白了。

实际默认设置是将套接字置于 中。例如,/var/run/mysqld/mysqld.sock确保没有剩余的配置。/etc/mysql/conf.d

相关内容