3

I have installed MantisBT 1.2.18 in one of our server and it is working fine. Then suddenly, I was ask if Mantis can be installed in different server but will still have to used the the existing database in the current Mantis server.

So I copy the whole folder to then new server, then I edited config_inc.php change the value of $g_hostname from "localhost" to the IP address of the current Mantis server.

    $g_hostname = '10.0.0.xxx';
    $g_db_type = 'mysql';
    $g_database_name = 'mantisdb';
    $g_db_username = 'root';
    $g_db_password = '';

But I got this errors:

APPLICATION ERROR #400 Database connection failed. Error received from database was #2003: Can't connect to MySQL server on '10.0.0.xxx' (61).

SYSTEM WARNING: 'mysql_connect(): Can't connect to MySQL server on '10.0.0.xxx' (61)' in '/Applications/MAMP/htdocs/mantis/library/adodb/drivers/adodb-mysql.inc.php' line 365.

My question is. Is it possible to use IP address in config_inc.php? What are other configuration files that I need to change?

I've posted this question in Mantis forum but didn't get any answer.

How anyone could help me solved this problem.

Many thanks in advance.

rhemb
  • 45
  • 1
  • 7
  • The mysql server on which the DB runs has to allow remote access via IP. Try simple php script from mantis location to connect to the DB to verify that the remote DB connection is allowed and confirm whether it's issue of mantis configuration. – David Jirman Feb 18 '15 at 01:28
  • I'm still trying to check and still not able to select a database but my script confirm that I was able to connect to the server... – rhemb Feb 20 '15 at 01:19
  • I was able to connect now to other database server. It was a database permission problem... Many thanks David Jirman ! ! ! – rhemb Feb 20 '15 at 01:47

1 Answers1

0

As per David Jirman's comment, this not a MantisBT issue, the connection failure is caused by incorrect DB setup (permissions).

Community
  • 1
  • 1
dregad
  • 1,150
  • 8
  • 21