Move database location
Posted: 14 Feb 2024, 20:55
I have MantisBT 2.26.0 installed (using 10.5.22-MariaDB) on a Linux server. It is working fine and have created a few issues in the database.
But now I want to move the database from the default location /var/lib/mysql to a different directory (/db).
Copied the database from /var/lib/mysql to /db
I have changed the path in /etc/my.cnf to:
and in /etc/my.cnf.d/mariadb-server.cnf
But when I restart the system and go to the webpage, I get the error:
Any ideas what I am missing?
But now I want to move the database from the default location /var/lib/mysql to a different directory (/db).
Copied the database from /var/lib/mysql to /db
I have changed the path in /etc/my.cnf to:
Code: Select all
[client]
socket=/db/mysql-data/mysql.sockCode: Select all
[mysqld]
datadir=/db/mysql-data
socket=/db/mysql-data/mysql.sockCode: Select all
APPLICATION ERROR #400: Database connection failed. Error received from database was #2002: No such file or directory.