Move database location

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
skrby
Posts: 1
Joined: 14 Feb 2024, 20:37

Move database location

Post 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?
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: Move database location

Post by cas »

That is a MySql/MariaDB issue, check on their forums.
Post Reply