我有硕士在5.6和从5.5,这将是测试ENV,以检查5.6是否可以复制5.5上的PROD。
启动mysql时,下面的错误如下所示
ERROR! MySQL server PID file could not be found!
Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/test.lester.com.pid).以下是/etc/my.nf的内容供参考:
# The following options will be passed to all MySQL clients
[client]
port = 3306
socket=/var/lib/mysql/mysql.sock
# The MySQL server
[mysqld]
port = 3306
socket=/var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
bind-address = 0.0.0.0
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
server-id = 2
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid我尝试了很多方法来解决这个错误..。但不幸的是没有运气,请帮帮忙。
发布于 2015-10-21 07:34:27
这与复制无关,尽管您在添加与复制相关的行时可能破坏了配置。特别地,您缺少了一个pid-file行,尝试将其添加到[mysqld]部分:
pid-file = /var/run/mysqld/mysqld.pid这一行目前是[mysqld_safe]部分,我认为它不属于那里。
发布于 2015-10-21 21:38:48
运行以下命令并确保配置中的pid文件与mysql cnf文件中的米舍尔德下的pid文件定义相匹配,在init.d脚本和您的配置中很可能有一个不匹配。
mysqld -缺省值
发布于 2015-10-21 22:27:17
阅读上面关于pid文件的文章,我只是想补充一下,有时您需要创建它。您还应该使用ps来反复检查mysql是否还在运行。
如果mysql正在运行,请将mysql_safe的pid (我认为)添加到pid文件中。
https://serverfault.com/questions/730468
复制相似问题