eiixy 发表于 2019-3-25 13:56:19

Mysql无法启动 The server quit without updating PID file (/www/mysql/mysql.pid)

最开始数据放在默认地址的,后来系统盘满了迁移数据存放地址后就无法启动了,

2019-03-25T05:08:48.584664Z 0 --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-03-25T05:08:48.584856Z 0 /usr/local/mysql/bin/mysqld (mysqld 5.7.22-log) starting as process 10644 ...
2019-03-25T05:08:48.600521Z 0 InnoDB: PUNCH HOLE support available
2019-03-25T05:08:48.600582Z 0 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-25T05:08:48.600592Z 0 InnoDB: Uses event mutexes
2019-03-25T05:08:48.600598Z 0 InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-25T05:08:48.600603Z 0 InnoDB: Compressed tables use zlib 1.2.3
2019-03-25T05:08:48.600613Z 0 InnoDB: Using Linux native AIO
2019-03-25T05:08:48.601366Z 0 InnoDB: Number of pools: 1
2019-03-25T05:08:48.601570Z 0 InnoDB: Using CPU crc32 instructions
2019-03-25T05:08:48.604278Z 0 InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-03-25T05:08:48.616778Z 0 InnoDB: Completed initialization of buffer pool
2019-03-25T05:08:48.620495Z 0 InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-25T05:08:48.632837Z 0 InnoDB: Highest supported file format is Barracuda.
2019-03-25T05:08:48.641244Z 0 InnoDB: Creating shared tablespace for temporary tables
2019-03-25T05:08:48.641297Z 0 InnoDB: Setting file '/www/mysql/data/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-03-25T05:08:48.696527Z 0 InnoDB: File '/www/mysql/data/ibtmp1' size is now 12 MB.
2019-03-25T05:08:48.697545Z 0 InnoDB: 1 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
2019-03-25T05:08:48.697561Z 0 InnoDB: 32 non-redo rollback segment(s) are active.
2019-03-25T05:08:48.698112Z 0 InnoDB: Waiting for purge to start
2019-03-25T05:08:48.748269Z 0 InnoDB: 5.7.22 started; log sequence number 61931
2019-03-25T05:08:48.748286Z 0 InnoDB: !!! innodb_force_recovery is set to 1 !!!
2019-03-25T05:08:48.748488Z 0 InnoDB: Loading buffer pool(s) from /www/mysql/data/ib_buffer_pool
2019-03-25T05:08:48.748787Z 0 InnoDB: Buffer pool(s) load completed at 190325 13:08:48
2019-03-25T05:08:48.748798Z 0 Plugin 'FEDERATED' is disabled.
2019-03-25T05:08:48.752117Z 0 InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
mysqld: Table 'mysql.plugin' doesn't exist
2019-03-25T05:08:48.752175Z 0 Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2019-03-25T05:08:48.775629Z 0 World-writable config file './auto.cnf' is ignored.
2019-03-25T05:08:48.775658Z 0 World-writable config file './auto.cnf' has been removed.

2019-03-25T05:08:48.775693Z 0 Salting uuid generator variables, current_pid: 10644, server_start_time: 1553490528, bytes_sent: 0,
2019-03-25T05:08:48.775768Z 0 Generated uuid: '12cd0f60-4ebc-11e9-a366-00163e02633c', server_start_time: 2996019653661723636, bytes_sent: 67479984
2019-03-25T05:08:48.775782Z 0 No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 12cd0f60-4ebc-11e9-a366-00163e02633c.
2019-03-25T05:08:48.781529Z 0 InnoDB: Cannot open table mysql/gtid_executed from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.
mysqld: Table 'mysql.gtid_executed' doesn't exist
2019-03-25T05:08:48.781556Z 0 Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-03-25T05:08:48.783220Z 0 Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-25T05:08:48.783238Z 0 Server hostname (bind-address): '*'; port: 3306
2019-03-25T05:08:48.783287Z 0 IPv6 is available.
2019-03-25T05:08:48.783304Z 0    - '::' resolves to '::';
2019-03-25T05:08:48.783328Z 0 Server socket created on IP: '::'.
2019-03-25T05:08:48.783385Z 0 Unix socket lock file is empty /tmp/mysql.sock.lock.
2019-03-25T05:08:48.783390Z 0 Unable to setup unix socket lock file.
2019-03-25T05:08:48.783395Z 0 Aborting


========/etc/my.cnf=============

#password   = your_password
port      = 3306
socket      = /tmp/mysql.sock


port      = 3306
socket      = /tmp/mysql.sock
datadir = /www/mysql/data
log-error = /www/mysql/error.log
pid-file = /www/mysql/mysql.pid
skip-external-locking
key_buffer_size = 32M
max_allowed_packet = 1M
table_open_cache = 128
sort_buffer_size = 768K
net_buffer_length = 8K
read_buffer_size = 768K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
thread_cache_size = 16
query_cache_size = 16M
tmp_table_size = 32M
performance_schema_max_table_instances = 1000
innodb_force_recovery = 1
#skip-grant-tables

explicit_defaults_for_timestamp = true
#skip-networking
max_connections = 500
max_connect_errors = 100
open_files_limit = 65535

log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
expire_logs_days = 10
early-plugin-load = ""

default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_data_home_dir = /www/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /www/mysql/data
innodb_buffer_pool_size = 128M
innodb_log_file_size = 32M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50


quick
max_allowed_packet = 16M


no-auto-rehash


key_buffer_size = 32M
sort_buffer_size = 768K
read_buffer = 2M
write_buffer = 2M


interactive-timeout

licess 发表于 2019-3-25 16:41:36

回复 1# 的帖子

不清楚你具体怎么迁移的过程,看日志有可能数据库文件缺失
官网和论坛常见问题里有具体迁移mysql的步骤
页: [1]
查看完整版本: Mysql无法启动 The server quit without updating PID file (/www/mysql/mysql.pid)