How do I import a large database into the LWS Panel?

Procédure

Why not use PHP MyAdmin to import a large database to the LWS Panel?

When you have a large database to import to your LWS Panel hosting, it is important to choose the most efficient import method to avoid problems and unnecessary downtime of your website.

Although PHP MyAdmin is a common option for importing databases to the LWS Panel, it may have some limitations in terms of file size. Indeed, PHP MyAdmin may encounter problems importing a large database when it reaches 100MB, resulting in an error during import.

Don't worry, there is an alternative way of importing a large database into the LWS Panel without using PHP MyAdmin. We're going to introduce you to this alternative method and show you how to use it to import your large database with ease.

Step 1: Creating the database that will host your data

Before importing your database onto your LWS Panel shared hosting, you must first create a blank database on your service to host the exported data. By default, your service comes with a ready-to-use database that has already been created. Connection details are available in the delivery email for your service. If you wish to install in another database, follow these steps:

1. Log in to your LWS customer area

To access your customer area, simply follow this link and enter your login details: https: //panel.lws.fr

2. Access your service management via the "Manage" button

How do I import a large database into the LWS Panel?

3. In the "Database & PHP" section, click on the "MySql & PhpMyadmin" button.

How do I import a large database into the LWS Panel?

4. Click on the "Click here to create a MySql database" button to create the new database.

How do I import a large database into the LWS Panel?

Your database is now created and ready to receive data imports. You will receive all the related information by email. Remember to keep all the information (database name, user name and password) contained in this email, as we will need it later.

Step 2: Importing your large database using the BigDump script

As your exported database is too large to be imported directly from phpMyAdmin, we're going to have to use another method to carry out this action. We're going to use a PHP script to retrieve the data and save it in the database we created in step 1. Here are the steps to follow:

1. Upload your SQL database to your FTP space

To do this, go back to managing your service on the LWS client panel and look for the "Files" section, then click on the "File manager" button.

How do I import a large database into the LWS Panel?

Next, we're going to create a folder in which we're going to add our SQL export file. To do this, simply click on "+Folder" and give the name "upload_bdd", for example, and confirm.

How do I import a large database into the LWS Panel?

How do I import a large database into the LWS Panel?

Go to the folder we've just created, then click on the "Upload" button.

How do I import a large database into the LWS Panel?

Select your .sql file to upload and confirm.

How do I import a large database into the LWS Panel?

2. Downloading and uploading the BigDump script

You can download the BigDump script directly from this link: Download BigDump

Once you've downloaded the "bigdump.zip" file, go back to your file manager and import it into the folder you created earlier, where you placed the database file you want to import.

How do I import a large database into the LWS Panel?

3. Unzip the bigdump.zip file

Still in the file manager, click on the line corresponding to the bigdump.zip file. Then click on the Extract button in the top right-hand corner.

How do I import a large database into the LWS Panel?

In the list on the left, find the folder where your file is located and click on it, a window will open. Simply click on the "Confirm" button

How do I import a large database into the LWS Panel?

4. Editing the extracted file "bigdump.php

To edit this file, simply click on its name. This will open the corresponding editing window.

How do I import a large database into the LWS Panel?

First, edit lines 41 to 44 using the information you received by email after creating the database in step 1.

41 $db_server = 'localhost'; // Specify the ip of the MySQL server 42 $db_name = ''; // Specify the database name 43 $db_username = ''; // Specify the database identifier 44 $db_password = ''; // Specify the database password

Don't forget to also modify line 54 by specifying the name of the file corresponding to the database you wish to import:

54 $filename = 'nom.sql'; // Replace with the name of the SQL file

To avoid encountering SQL query limits, you can modify certain options. This trick can be useful if your database contains a large number of entries.

56 $linespersession = 3000; // Number of lines per import session 57 $delaypersession = 0; // Waiting time between two import sessions 93 $max_query_lines = 300; // Number of lines per query

4. Run bigdump.php via your browser

To run the script and import your database, simply access the URL of the file via your browser. In the example given, the URL would be "https://www.mondomaine.com/upload_bdd/bigdump.php".

Bear in mind that importing may take several minutes depending on the size of your database.

How do I import a large database into the LWS Panel?

Once you have finished importing your database, you can delete the "upload_bdd" folder in the file manager of your LWS Panel hosting. Don't forget to update the connection information in your site or application by entering the information received in the database creation email:

  • Host: IP of the MySQL server
  • Base: The name of the database you created
  • Username: The username of your database
  • Password: The password for your database

Can LWS do this for you?

Yes, LWS can carry out this work for you, but only via a paid facilities management service. In fact, LWS can provide management and maintenance services for your infrastructure for an additional fee. If you are interested in this service, we can provide you with more information on the different options available and the associated costs.

You can set up a managed service with LWS from €9.99 from the LWS Panel control panel in the Support section. I invite you to follow this documentation to help you set up your outsourcing.

Rate this article :

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

1mn reading

How do I create a Mysql database?

0mn reading

How do I change my Mysql password?

1mn reading

How can I access my Mysql databases (PhpMyAdmin)?

0mn reading

How do I restore my MySQL database?


Ask the LWS team and its community a question