我尝试在 xampp 中启动 mysql,但它总是意外停止。下面是错误日志中记录的最常见错误行的摘录:
InnoDB: using atomic writes.
2020-01-03 12:49:14 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-01-03 12:49:14 0 [Note] InnoDB: Uses event mutexes
2020-01-03 12:49:14 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-03 12:49:14 0 [Note] InnoDB: Number of pools: 1
2020-01-03 12:49:14 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-01-03 12:49:14 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-01-03 12:49:14 0 [Note] InnoDB: Completed initialization of buffer pool
2020-01-03 12:49:14 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-01-03 12:49:14 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-01-03 12:49:14 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-01-03 12:49:14 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-01-03 12:49:14 0 [Note] InnoDB: 10.4.10 started; log sequence number 114718; transaction id 9
2020-01-03 12:49:14 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-01-03 12:49:14 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-01-03 12:49:14 0 [Note] InnoDB: Buffer pool(s) load completed at 200103 12:49:14
2020-01-03 12:49:14 0 [Note] Server socket created on IP: '::'.
下面是 my.ini 文件,我已将端口更改为 3308,将 max_allowed_packet 更改为 128M,将 innodb_log_file_size 更改为 183M。如何解决这些问题?我也按照此堆栈中的答案操作,但仍然无法解决它。https://dba.stackexchange.com/questions/6134/fixing-mysql-errors-recorded-in-error-logs
# The following options will be passed to all MySQL clients
[client]
# password = your_password
port=3308
socket="C:/xampp/mysql/mysql.sock"
# Here follows entries for some specific programs
# The MySQL server
default-character-set=utf8mb4
[mysqld]
port=3308
socket="C:/xampp/mysql/mysql.sock"
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data"
pid_file="mysql.pid"
# enable-named-pipe
key_buffer=16M
max_allowed_packet=128M
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
log_error="mysql_error.log"
innodb_data_home_dir="C:/xampp/mysql/data"
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_group_home_dir="C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"
innodb_buffer_pool_size=16M
innodb_log_file_size=183M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=50
## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="C:/xampp/mysql/share/charsets"
sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION
log_bin_trust_function_creators=1
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
[mysqldump]
max_allowed_packet=128M
[isamchk]
key_buffer=20M
sort_buffer_size=20M
read_buffer=2M
write_buffer=2M
[myisamchk]
key_buffer=20M
sort_buffer_size=20M
read_buffer=2M
write_buffer=2M
[mysqlhotcopy]
[mysqld]
max_allowed_packet=128M