mariadb将系统数据库移动到新位置

时间:2016-08-12 18:00:03

标签: mariadb

我刚刚在Ubuntu 16.04上安装了Mariadb 10.1.16,但由于空间不足而无法将默认数据目录安装到另一个卷。我已将datadir条目添加到我的mysql.cnf文件中,但是当我尝试加载mysql服务时,我得到以下结果:

ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140584295778560 [Note] Plugin 'FEEDBACK' is disabled.
ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140583574173440 [Note] InnoDB: Dumping buffer pool(s) not yet started
ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140584295778560 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140584295778560 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140584295778560 [Note] Server socket created on IP: '::'.
ago 12 08:27:40 aristotle mysqld[13786]: 2016-08-12  8:27:40 140584295778560 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't 
ago 12 08:27:40 aristotle systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
ago 12 08:27:40 aristotle systemd[1]: Failed to start MariaDB database server.
ago 12 08:27:40 aristotle systemd[1]: mariadb.service: Unit entered failed state.
ago 12 08:27:40 aristotle systemd[1]: mariadb.service: Failed with result 'exit-code'.

我的配置文件是:

[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
default-character-set = utf8 

[mysqld]
#
# * Character sets
# 
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
character-set-server  = utf8 
collation-server      = utf8_general_ci 
character_set_server   = utf8 
collation_server       = utf8_general_ci
datadir               = /BulkData/Mariadb 

如何将数据库放在不同的卷上,我需要做什么?

0 个答案:

没有答案