关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

宝塔数据库无法启动

发布时间:2020-05-25 13:57:26 编辑:特网云

mysql5.6,用这个my.cnf就好了。

出错
Unknown suffix '.' used for variable 'innodb-log-buffer-size' (value '0.25M')
2020-04-09 11:57:33 36173 [Warning] option 'innodb-log-buffer-size': signed value 0 adjusted to 262144
2020-04-09 11:57:33 36173 [ERROR] /www/server/mysql/bin/mysqld: Error while setting value '0.25M' to 'innodb-log-buffer-size'
2020-04-09 11:57:33 36173 [ERROR] Parsing options for plugin 'InnoDB' failed.
2020-04-09 11:57:33 36173 [Note] Plugin 'FEDERATED' is disabled.
2020-04-09 11:57:33 36173 [ERROR] /www/server/mysql/bin/mysqld: unknown variable 'innodb_data_home_dir=/www/server/data'
2020-04-09 11:57:33 36173 [ERROR] Aborting
2020-04-09 11:57:33 36173 [Note] Binlog end
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'partition'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'ARCHIVE'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'BLACKHOLE'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_METRICS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMPMEM'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_CMP'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_LOCKS'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'INNODB_TRX'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'MyISAM'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'CSV'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'MRG_MYISAM'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'MEMORY'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'sha256_password'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'mysql_old_password'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'mysql_native_password'
2020-04-09 11:57:33 36173 [Note] Shutting down plugin 'binlog'

2020-04-09 11:57:33 36173 [Note] /www/server/mysql/bin/mysqld: Shutdown complete


复制配置文件宝塔mysql


[client]
#password   = your_password
port        = 3306
socket      = /tmp/mysql.sock
[mysqld]
port        = 3306
socket      = /tmp/mysql.sock
datadir = /www/server/data
skip-external-locking
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache = 128
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 = 256K
myisam_sort_buffer_size = 8M
thread_cache_size = 16
query_cache_size = 16M
tmp_table_size = 32M
explicit_defaults_for_timestamp = true
#skip-networking
#skip-name-resolve
max_connections = 500
max_connect_errors = 100
open_files_limit = 65535
sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIO
log-bin=mysql-bin
binlog_format=mixed
server-id   = 1
expire_logs_days = 3
#loose-innodb-trx=0
#loose-innodb-locks=0
#loose-innodb-lock-waits=0
#loose-innodb-cmp=0
#loose-innodb-cmp-per-index=0
#loose-innodb-cmp-per-index-reset=0
#loose-innodb-cmp-reset=0
#loose-innodb-cmpmem=0
#loose-innodb-cmpmem-reset=0
#loose-innodb-buffer-page=0
#loose-innodb-buffer-page-lru=0
#loose-innodb-buffer-pool-stats=0
#loose-innodb-metrics=0
#loose-innodb-ft-default-stopword=0
#loose-innodb-ft-inserted=0
#loose-innodb-ft-deleted=0
#loose-innodb-ft-being-deleted=0
#loose-innodb-ft-config=0
#loose-innodb-ft-index-cache=0
#loose-innodb-ft-index-table=0
#loose-innodb-sys-tables=0
#loose-innodb-sys-tablestats=0
#loose-innodb-sys-indexes=0
#loose-innodb-sys-columns=0
#loose-innodb-sys-fields=0
#loose-innodb-sys-foreign=0
#loose-innodb-sys-foreign-cols=0
default_storage_engine = InnoDB
innodb_data_home_dir = /www/server/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /www/server/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
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 32M
sort_buffer_size = 768K
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout


image.png


保存 重新启动



/template/Home/twy/PC/Static