Accessing a remote MySQL database on LWS Panel: what is possible

Procédure

The LWS Panel hosting plans (Perso, Starter and Performance) do not include remote access to MySQL databases: you cannot connect a software program from your computer, another hosting account, or another server directly to a database on your hosting plan. To retrieve the data from a database, for example when moving a site from one LWS Panel hosting plan to another, export it and then import it with phpMyAdmin. If a software program really needs to connect to the database from outside, you need an offer that allows it: cPanel for occasional use, or a VPS server.

What your LWS Panel hosting allows

On LWS's web hosting offers page, the line “MySQL remote access” is indicated as “with cPanel” for the three LWS Panel plans: this feature belongs to cPanel offers, not to LWS Panel. There is therefore no setting in LWS Panel to allow an external IP address to connect to your databases.

The settings shown in “MySql & PhpMyadmin” (“Server IP”, “Database” and “User” columns) are used to configure the sites installed on your hosting account, as explained in the help article How to import a database on shared LWS hosting with phpMyAdmin. To view or modify a database yourself, use phpMyAdmin from your browser: How do I access my Mysql databases (PhpMyAdmin)?.

Retrieve the data from a database on another hosting account

This is the method to follow when moving a site to another LWS Panel hosting account: instead of having the new site read the old database, you copy its content into a database on the new hosting account.

  1. Export the database from the old hosting account

    On the old hosting account, open phpMyAdmin with the database user and password, then export it in SQL format. All the steps are in the help article How do I export a Mysql database?. Save the resulting file on your computer.

  2. Prepare a database on the new hosting account

    On the new hosting account, use the database included with your service or create one in “MySql & PhpMyadmin” with the “Click here to create a MySql database” button. The database name, user and password are generated by LWS and the password is sent to you by email: see How do I create a Mysql database?.

  3. Import the SQL file into this database

    Connect to phpMyAdmin on the new hosting account, click the database name, then click “Import”, as described in How to import a database on shared LWS hosting with phpMyAdmin. If your file reaches 100 MB, follow How to import a large database on LWS Panel? instead.

  4. Enter the new database in the site configuration

    In the site configuration file (wp-config.php for WordPress, for example), replace the old values with those from the new database line in “MySql & PhpMyadmin”:

    • host: the IP address from the “Server IP” column (and not “localhost”);
    • database name: the “Database” column;
    • user: the “User” column;
    • password: the one received by email when the database was created. It is not displayed in LWS Panel: if you lost it, change it with the “⋮” button on the line, then “Change password”.

Check that everything works

  • The site displays normally, without the “Error establishing a database connection” message.
  • In “MySql & PhpMyadmin”, the “Database size” column of the new database is no longer 0 MB. If it does not change after the import, click the “⋮” button on the line, then click “Synchronize quotas” to recalculate the displayed size.

If the site displays a database connection error, compare the values in the configuration file one by one with those in the database line. The help article Error when connecting to the database on WordPress details this case for a WordPress site.

If a software program must connect to the database from outside

Some software programs (database management tools on your computer, management software, applications hosted elsewhere) need a direct connection to the database. This is not possible on an LWS Panel hosting account. Depending on your use case:

Frequently asked questions

My connection to the address in the “Server IP” column fails from another hosting account (“Connection timed out”)

Remote access to MySQL databases is not included in LWS Panel plans: do not rely on a direct connection to the database from another hosting account. To retrieve its content, export it from phpMyAdmin on the old hosting account and import it on the new one, as explained above.

Can I open my database to an IP address from LWS Panel?

No. The “MySql & PhpMyadmin” page lets you create a database, open phpMyAdmin, change a user's password, manage database backups and delete it, but it does not have any remote access setting. This feature exists on cPanel offers (for occasional use) and on VPS servers.

Related articles

help.lws.net/a/8167
Was this article helpful?

Yes

No

Read 6 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.