Rate this article :
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Sommaire
Procédure
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.
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
3. In the "Database & PHP" section, click on the "MySql & PhpMyadmin" button.
4. Click on the "Click here to create a MySql database" button to create the new database.
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.
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.
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.
Go to the folder we've just created, then click on the "Upload" button.
Select your .sql file to upload and confirm.
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.
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.
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
4. Editing the extracted file "bigdump.php
To edit this file, simply click on its name. This will open the corresponding editing window.
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.
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:
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 ?
Yes
No
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?