Advertisement:

Author Topic: Connect to external DDBB  (Read 376 times)

Offline Dimitrix1011

  • Newbie
  • *
  • Posts: 3
Connect to external DDBB
« 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:

Code: [Select]
########## 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,

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,399
    • StoryBB/StoryBB on GitHub
Re: Connect to external DDBB
« Reply #1 on: May 14, 2019, 10:34:30 AM »
Is it definitely a MySQL database? That’s a weird port number if it is.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Dimitrix1011

  • Newbie
  • *
  • Posts: 3
Re: Connect to external DDBB
« Reply #2 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.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,139
Re: Connect to external DDBB
« Reply #3 on: May 14, 2019, 10:53:23 AM »
are you connecting to phpmyadmin from the same machine you are trying to connect with SMF?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,399
    • StoryBB/StoryBB on GitHub
Re: Connect to external DDBB
« Reply #4 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Dimitrix1011

  • Newbie
  • *
  • Posts: 3
Re: Connect to external DDBB
« Reply #5 on: May 15, 2019, 03:38:18 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!