Jump to content

Existing installation moving to external MySQL server


Recommended Posts

Hey all,

I need some help with an already installed IPS and moving the database to an external server.

I already tried few steps but without success by editing the conf_global.php file:

  'sql_host' => 'localhost',
  'sql_database' => 'xxxxx-db-name',
  'sql_user' => 'xxxxx-user',
  'sql_pass' => 'xxxxx',

Tried to change the host to the external server after added the IP to whitelist using Cpanel with the hosted files to Cyberpanel server.

The ports are the same, there's one difference with the mysql.sock file:

Cpanel server:

  'sql_socket' => '/var/lib/mysql/mysql.sock',

Cyberpanel server (CentOS):

  'sql_socket' => '/var/run/mysqld/mysqld.sock', 

There's something that I miss?

Edited by IceCore
Link to comment
Share on other sites

On 8/2/2020 at 8:15 AM, IceCore said:

Cpanel server:


  'sql_socket' => '/var/lib/mysql/mysql.sock',

Cyberpanel server (CentOS):


  'sql_socket' => '/var/run/mysqld/mysqld.sock', 

There's something that I miss?

Most likely, you do not want to use SQL sockets with a MySQL database that's on a separate server. This will not work unless you're doing something that's rather atypical.

You'll want to verify that the external MySQL server is configured to accept connections from your server (by default, MySQL only accepts connections on the same server), and that you've entered in the correct IP address under sql_host in conf_global.php.

For testing purposes, you can use the mysql command from the Unix shell on your web server to verify that you can establish a connection like this:

mysql -h <IP_ADDRESS_OF_EXTERNAL_MYSQL_SERVER> -u <INVISION_MYSQL_USER> -D <INVISION_DATABASE_NAME> -p

You will be prompted for the password for the SQL account. Replace <IP_ADDRESS_OF_EXTERNAL_MYSQL_SERVER> with the IP address of your external server (sql_host), <INVISION_MYSQL_USER> with the SQL username you configured for Invision (sql_user), and <INVISION_DATABASE_NAME> with the name of the database (sql_database). The password you'll provide is the one configured for your Invision SQL account (sql_pass).

Link to comment
Share on other sites

10 hours ago, Paul E. said:

Most likely, you do not want to use SQL sockets with a MySQL database that's on a separate server. This will not work unless you're doing something that's rather atypical.

You'll want to verify that the external MySQL server is configured to accept connections from your server (by default, MySQL only accepts connections on the same server), and that you've entered in the correct IP address under sql_host in conf_global.php.

For testing purposes, you can use the mysql command from the Unix shell on your web server to verify that you can establish a connection like this:


mysql -h <IP_ADDRESS_OF_EXTERNAL_MYSQL_SERVER> -u <INVISION_MYSQL_USER> -D <INVISION_DATABASE_NAME> -p

You will be prompted for the password for the SQL account. Replace <IP_ADDRESS_OF_EXTERNAL_MYSQL_SERVER> with the IP address of your external server (sql_host), <INVISION_MYSQL_USER> with the SQL username you configured for Invision (sql_user), and <INVISION_DATABASE_NAME> with the name of the database (sql_database). The password you'll provide is the one configured for your Invision SQL account (sql_pass).

Thank you! I'll try that

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...