Page 1 of 1

Move database location

Posted: 14 Feb 2024, 20:55
by skrby
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:

Code: Select all

[client]
socket=/db/mysql-data/mysql.sock
and in /etc/my.cnf.d/mariadb-server.cnf

Code: Select all

[mysqld]
datadir=/db/mysql-data
socket=/db/mysql-data/mysql.sock
But when I restart the system and go to the webpage, I get the error:

Code: Select all

APPLICATION ERROR #400: Database connection failed. Error received from database was #2002: No such file or directory.
Any ideas what I am missing?

Re: Move database location

Posted: 05 Mar 2024, 14:37
by cas
That is a MySql/MariaDB issue, check on their forums.