Page 1 of 1

Mantis with MySQL on a different machine. Is this possible?

Posted: 28 Apr 2010, 07:36
by blackcat
Hi,

I have installed Apache and PHP and Mantis into a machinne (Linux red hat), but I have a database (MySQL) on a different machine.

Mantis is it possible to configure to point to this database is on the other machine?

I have change config_inc.php like:

Code: Select all

$g_hostname      = 'xxx.xxx.xxx.xxx';
$g_db_username   = 'ususermantis';
$g_db_password   = 'passw';
$g_database_name = 'mantis_DB';
$g_db_type       = 'mysql';
But when I go to the home page, I get this error in the browser:
SYSTEM WARNING: mysql_connect() [function.mysql-connect]: Access denied for user 'ususermantis'@'yyy.yyy.yyy.yyy' (using password: YES)
Fatal error: Call to undefined function event_clear_callbacks() in /usr/local/apache2/htdocs/mantis/core/error_api.php on line 135
where xxx.xxx.xxx.xxx is the machine where is the apache, php and mantis and
yyy.yyy.yyy.yyy is the machine where is MySQL

Re: Mantis with MySQL on a different machine. Is this possib

Posted: 28 Apr 2010, 16:10
by emandell
it should be fine to connect to a database on a different machine (I already do that without any problems), it looks like you dont have access to the database, can you connect from a command line?

for example

mysql -uususermantis -ppassw -hxxx.xxx.xxx.xxx mantis_DB

if this doesnt work then you need to make fix it in the mysql database, its not a mantis issue

Re: Mantis with MySQL on a different machine. Is this possib

Posted: 22 May 2010, 07:53
by eelcodegraaff
mysql is denying network connections by default. You have to configure mysql manualy to accept connections other than localhost.