首页 新闻 会员 周边

修改mariadb数据目录,启动报错,使用以前的/var/lib/mysql,就没有问题?权限也修改了,下面是log日志

0
[待解决问题]


[root@localhost system]# systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@localhost system]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 二 2019-03-05 16:04:37 CST; 4s ago
Process: 16793 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 16792 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 16761 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 16792 (code=exited, status=0/SUCCESS)

3月 05 16:04:36 localhost.localdomain systemd[1]: Starting MariaDB database server...
3月 05 16:04:36 localhost.localdomain mariadb-prepare-db-dir[16761]: Database MariaDB is probably initialized in /home/mysql already, nothi...done.
3月 05 16:04:36 localhost.localdomain mariadb-prepare-db-dir[16761]: If this is not the case, make sure the /home/mysql is empty before run...-dir.
3月 05 16:04:36 localhost.localdomain mysqld_safe[16792]: 190305 16:04:36 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
3月 05 16:04:36 localhost.localdomain mysqld_safe[16792]: 190305 16:04:36 mysqld_safe Starting mysqld daemon with databases from /home/mysql
3月 05 16:04:37 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
3月 05 16:04:37 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
3月 05 16:04:37 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
3月 05 16:04:37 localhost.localdomain systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost system]#

[root@localhost system]# cat /var/log/mariadb/mariadb.log
190305 16:08:36 mysqld_safe Starting mysqld daemon with databases from /home/mysql
190305 16:08:36 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 17182 ...
190305 16:08:36 [Warning] Can't create test file /home/mysql/localhost.lower-test
190305 16:08:36 [ERROR] mysqld: File '/home/mysql/aria_log_control' not found (Errcode: 13)
190305 16:08:36 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/home/mysql/aria_log_control'
190305 16:08:36 [ERROR] Plugin 'Aria' init function returned error.
190305 16:08:36 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
190305 16:08:36 InnoDB: The InnoDB memory heap is disabled
190305 16:08:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190305 16:08:36 InnoDB: Compressed tables use zlib 1.2.7
190305 16:08:36 InnoDB: Using Linux native AIO
190305 16:08:36 InnoDB: Initializing buffer pool, size = 128.0M
190305 16:08:36 InnoDB: Completed initialization of buffer pool
190305 16:08:36 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
190305 16:08:37 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
[root@localhost system]#

Free-Wiki的主页 Free-Wiki | 菜鸟二级 | 园豆:205
提问于:2019-03-05 16:21
< >
分享
所有回答(1)
0

你有没有把 /var/lib/mysql 中的数据移动到新的数据目录?

AYard | 园豆:436 (菜鸟二级) | 2019-03-05 23:15
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册