Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Dimitrix1011 on May 14, 2019, 10:28:47 AM

Title: Connect to external DDBB
Post by: Dimitrix1011 on May 14, 2019, 10:28:47 AM
Hi!

I need to connect to a external DDBB with port like: pl52230-004.dbaas.ovh.net:35148

I change the Settings.php with the next configuration:

########## Database Info ##########
$db_type = 'mysql';
$db_server = 'pl52230-004.dbaas.ovh.net:35148';
$db_name = 'mydbname';
$db_user = 'mydbuser';
$db_passwd = 'mypassword';
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;


But don't work, anyone can help me?

Thank you,
Title: Re: Connect to external DDBB
Post by: Arantor on May 14, 2019, 10:34:30 AM
Is it definitely a MySQL database? That's a weird port number if it is.
Title: Re: Connect to external DDBB
Post by: Dimitrix1011 on May 14, 2019, 10:45:03 AM
Is MySQL, the port is from OVH.

I authorized my VPS IP, and I am using the database with PHPmyadmin without problems.
Title: Re: Connect to external DDBB
Post by: Illori on May 14, 2019, 10:53:23 AM
are you connecting to phpmyadmin from the same machine you are trying to connect with SMF?
Title: Re: Connect to external DDBB
Post by: Arantor on May 14, 2019, 11:03:54 AM
I checked the code, SMF 2.0 does not support MySQL on a non default port out of the box.

If you change your php.ini file, though, with the setting mysqli.default_port, you can set that to be the port you care about.
Title: Re: Connect to external DDBB
Post by: Dimitrix1011 on May 15, 2019, 03:38:18 AM
Quote from: Arantor on May 14, 2019, 11:03:54 AM
I checked the code, SMF 2.0 does not support MySQL on a non default port out of the box.

If you change your php.ini file, though, with the setting mysqli.default_port, you can set that to be the port you care about.

Thank you, work it!