mysql出现问题:Starting MySQL.The server quit without updating PID file

死神骑士 发布于 2013/12/16 09:56
阅读 5K+
收藏 0
mysql出现问题:Starting MySQL.The server quit without updating PID file (/data/mysql/data/tsaweb1.pid).

服务器内存8G,my.cnf的内容如下:

[client]
#password = [your_password]
port = 3306
socket = /tmp/mysqld.sock

[mysqld]

port = 3306
socket = /tmp/mysqld.sock
back_log = 50

max_connections = 1500

max_connect_errors = 10

table_open_cache = 2048

max_allowed_packet = 16M

binlog_cache_size = 1M

max_heap_table_size = 64M

read_buffer_size = 32M

read_rnd_buffer_size = 32M

sort_buffer_size = 8M

join_buffer_size = 8M

thread_cache_size = 32

thread_concurrency = 8

query_cache_size = 256M

query_cache_limit = 2M

ft_min_word_len = 4

default-storage-engine = MYISAM

thread_stack = 192K

transaction_isolation = REPEATABLE-READ

tmp_table_size = 64M

log-bin=mysql-bin

binlog_format=mixed

slow_query_log

long_query_time = 2

server-id = 1

bulk_insert_buffer_size = 64M

myisam_sort_buffer_size = 256M

myisam_max_sort_file_size = 10G

myisam_repair_threads = 1

myisam_recover

innodb_additional_mem_pool_size = 16M

innodb_buffer_pool_size = 2G

innodb_data_file_path = ibdata1:10M:autoextend

innodb_write_io_threads = 8
innodb_read_io_threads = 8

innodb_thread_concurrency = 8

innodb_flush_log_at_trx_commit = 1

innodb_log_buffer_size = 8M

innodb_log_file_size = 256M

innodb_log_files_in_group = 3

innodb_max_dirty_pages_pct = 90

innodb_lock_wait_timeout = 120

[mysqldump]
quick

max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 512M
sort_buffer_size = 32M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

麻烦各位大高手帮忙解决一下。。跪求
加载中
0
红薯
红薯

更改 mysql 的数据目录了?? 禁用 SELINUX 吧,否则 MySQL 起不来

红薯
红薯
回复 @死神骑士 : 查看 err 日志的提示信息
死神骑士
死神骑士
关键是以前一直没问题,好了几天才不行的。。
死神骑士
死神骑士
禁用了,还是不行啊。。是不是配置有问题,大大麻烦你帮我解决一下。。远程的服务器,不能重装啊。。
0
Tuesday
Tuesday

把data目录下的所有文件删除. 保留目录

0
死神骑士
死神骑士

引用来自“红薯”的答案

更改 mysql 的数据目录了?? 禁用 SELINUX 吧,否则 MySQL 起不来

131216 11:26:45 mysqld_safe The file /data/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information


请问这个是什么问题造成的?

红薯
红薯
安装 MySQL 后要修改数据目录手续还挺麻烦的,如果不熟悉,建议先别动。检查数据目录的权限、重新初始化数据库之类的
0
死神骑士
死神骑士

引用来自“死神骑士”的答案

引用来自“红薯”的答案

更改 mysql 的数据目录了?? 禁用 SELINUX 吧,否则 MySQL 起不来

131216 11:26:45 mysqld_safe The file /data/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information


请问这个是什么问题造成的?

我又把mysql重新安装了一下,还是不行,现在的日志是:

131216 16:52:28  InnoDB: Waiting for the background threads to start
131216 16:52:29 InnoDB: 1.1.8 started; log sequence number 1595675
131216 16:52:29 [Note] Recovering after a crash using mysql-bin
131216 16:52:29 [Note] Starting crash recovery...
131216 16:52:29 [Note] Crash recovery finished.
131216 16:52:30 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131216 16:52:30 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
131216 16:52:30 [Note] Server socket created on IP: '0.0.0.0'.
131216 16:52:30 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
131216 16:52:30 mysqld_safe mysqld from pid file /data/mysql/data/tsaweb1.pid ended

请问应该怎么解决啊。。总不能重装系统吧。。

0
南湖船老大
南湖船老大

你不应该重装的啊,太冲动了。

之前出现问题,就应该先回忆自己最近动了啥,一般不会无缘无故就坏了。也许之前的问题比现在更简单

返回顶部
顶部