MySQL 5.6无法启动,因为它无法写入世界可写目录

时间:2019-10-14 23:37:36

标签: mysql ubuntu

我刚刚将系统从MySQL 5.5升级到MySQL 5.6。有点奏效:

$ mysql --version
mysql  Ver 14.14 Distrib 5.6.33, for debian-linux-gnu (x86_64) using  EditLine wrapper

但是我不能真正使用它:

$ mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

我正在尝试像这样启动mysql:

sudo service mysql start

但是我明白了:

start: Job failed to start

如果我查看/var/log/upstart/mysql.log,我会看到:

2019-10-14 22:48:16 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2019-10-14 22:48:16 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-10-14 22:48:16 0 [Note] /usr/sbin/mysqld (mysqld 5.6.33-0ubuntu0.14.04.1) starting as process 10064 ...
2019-10-14 22:48:16 10064 [Warning] Can't create test file /apps/arkenstone/db/mysql/arkenstone-01-dev-us-central1-b.lower-test
2019-10-14 22:48:16 10064 [Warning] Can't create test file /apps/arkenstone/db/mysql/arkenstone-01-dev-us-central1-b.lower-test
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

但是/ apps / arkenstone / db / mysql是世界可写的。没有什么可以写的。

# ls -la /apps/arkenstone/db/mysql
total 0
drwxrwxrwx 3 mysql mysql  16 Oct 14 22:45 .
drwxrwxr-x 3 jav   jav   117 Oct 11 23:04 ..

它也有很多磁盘空间:

$ df
Filesystem        1K-blocks     Used  Available Use% Mounted on
/dev/mapper/apps 2096125948 83453440 2012672508   4% /apps

这是/var/log/mysql/error.log:

2019-10-14 23:29:34 10290 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2019-10-14 23:29:34 10290 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
2019-10-14 23:29:34 10290 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2019-10-14 23:29:34 10290 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-10-14 23:29:34 10290 [Note] InnoDB: The InnoDB memory heap is disabled
2019-10-14 23:29:34 10290 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-10-14 23:29:34 10290 [Note] InnoDB: Memory barrier is not used
2019-10-14 23:29:34 10290 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-10-14 23:29:34 10290 [Note] InnoDB: Using Linux native AIO
2019-10-14 23:29:34 10290 [Note] InnoDB: Using CPU crc32 instructions
/usr/sbin/mysqld: Can't create/write to file '/apps/arkenstone/db/mysql/tmp/ibw0jaWa' (Errcode: 2 - No such file or directory)
2019-10-14 23:29:34 7f91cb6d6780  InnoDB: Error: unable to create temporary file; errno: 2
2019-10-14 23:29:34 10290 [ERROR] Plugin 'InnoDB' init function returned error.
2019-10-14 23:29:34 10290 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-10-14 23:29:34 10290 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-10-14 23:29:34 10290 [ERROR] Aborting

2019-10-14 23:29:34 10290 [Note] Binlog end
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'partition'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_METRICS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_CMP'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'INNODB_TRX'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'ARCHIVE'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'BLACKHOLE'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'MEMORY'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'MRG_MYISAM'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'MyISAM'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'CSV'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'sha256_password'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'mysql_old_password'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'mysql_native_password'
2019-10-14 23:29:34 10290 [Note] Shutting down plugin 'binlog'
2019-10-14 23:29:34 10290 [Note] /usr/sbin/mysqld: Shutdown complete

0 个答案:

没有答案