MariaDB start failure resolution after modifying storage path

Source: Internet
Author: User

Modify the MariaDB path to the home path,

When executing systemctl start mariadb startup mariadb, error message:

Job for Mariadb.service failed because the control process exited with error code. See "Systemctl Status Mariadb.service" and "Journalctl-xe" for details.

Systemctl Status Mariadb.service View error details

[Warning] Can ' t create test file/home/data/mariadbdata/localhost.lower-testmariadb.service:main process exited, code=exited, status=1/failurefailed to start MariaDB 10.3.9 database server.

The problem is because MARIADB has no access to the home path

Workaround:

1. Turn off SELinux

2. Modify the storage path permissions,

Chown-r Mysql:mysql/home/mysql_datachmod-r 764/home/mysql_data

3. If your storage path is the path below home, then here's the point:

Vim/etc/systemd/system/mariadb.service.d/homedir.conf

Enter the following content

[Service] Protecthome=false

And then execute

Systemctl Daemon-reload

Restart MARIADB

Systemctl Start mariadb

  

MariaDB start failure resolution after modifying storage path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.