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

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
blackcat
Posts: 5
Joined: 03 Nov 2009, 09:00

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

Post 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
emandell
Posts: 7
Joined: 08 Mar 2010, 18:24

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

Post 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
eelcodegraaff
Posts: 10
Joined: 21 May 2010, 13:54

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

Post by eelcodegraaff »

mysql is denying network connections by default. You have to configure mysql manualy to accept connections other than localhost.
Post Reply