MySQL on a different machine. Is this possible?

Get help from other users here.

Moderators: Developer, Contributor

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

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

Re: MySQL on a different machine. Is this possible?

Post by cas »

Localhost needs to be the server that holds MySQL :D
skayser
Posts: 9
Joined: 20 Apr 2006, 15:05

Re: MySQL on a different machine. Is this possible?

Post by skayser »

cas wrote:Localhost needs to be the server that holds MySQL :D
Sorry, not true, Mantis runs perfectly fine with a remote MySQL host. The error message points to an authentication problem.

@blackcat: Make sure you can connect from the Mantis host to the MySQL host with the mysql command line utility first.

Code: Select all

mysql -h <mysqlhost> -u <user> -p <mantis_database>
When that's working properly, you can move on to Mantis. Otherwise investigate the permissions on the MySQL server, your Mantis user needs to have remote access privileges to the Mantis database.

Code: Select all

GRANT ALL PRIVILEGES ON mantisbt.* TO <mantisuser>@<mantishost> IDENTIFIED BY '<mantispassword>';
Post Reply