How do I import a large database onto cPanel LWS hosting?

Procédure

What is a large database and why is it difficult to import with PHP MyAdmin?

The size of the data stored in a database can increase rapidly over time, especially when a lot of information is collected. When the size of the database becomes significant, it becomes difficult to manage and import using conventional tools such as PHP MyAdmin.

On cPanel, a large database for phpMyAdmin is one that is 250MB in size. If you try to import a large database with PHP MyAdmin, you may encounter problems such as execution time errors, memory errors, or simply an inability to complete the import process.

Fortunately, there are other ways of importing a large database onto cPanel LWS hosting without encountering these problems. In this documentation, we will show you how to import a large database onto your cPanel LWS hosting using alternative and more efficient methods than PHP MyAdmin.

Step 1: Creating the database that will host your data

Before importing your database onto your cPanel hosting, you must first create a blank database on your cPanel service to host the exported data. Here's how to do it:

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 the management of your cPanel service

How do I import a large database onto cPanel LWS hosting?

3. Click on the Access to cPanel button in the "Hosting Management" section.

How do I import a large database onto cPanel LWS hosting?

4. Go to the "Database" section and click on "MySQL databases".

How do I import a large database onto cPanel LWS hosting?

5. Create a database by naming it. Then click on "Create a database".

How do I import a large database onto cPanel LWS hosting?

6. Add a MySQL user at the bottom of the page.

Enter the desired name, generate a password and make a note of it. Then click on the "Create a user" button.

How do I import a large database onto cPanel LWS hosting?

7. Now add the MySQL user to the database you created earlier.

To do this, go to the bottom of the page, select the database and user created and click on the "Add" button.

How do I import a large database onto cPanel LWS hosting?

On the next page, tick the "ALL PRIVILEGES" box and click on the "Make changes" button.

How do I import a large database onto cPanel LWS hosting?

Your database is now created and ready to receive your data imports. Make sure you keep all your details, such as the database name, user name and password, as you will need them later.

Step 2: Importing your large database using cPanel Web Terminal

Due to the large size of your exported database, direct import from phpMyAdmin is not possible. We will therefore have to use another method to carry out this operation, using the cPanel web terminal to retrieve the data and save it in the database created in step 1. Here are the steps to follow:

1. Upload your SQL database to your FTP space

To do this, you need to access the cPanel control panel for your service, then click on the "File Manager" button.

How do I import a large database onto cPanel LWS hosting?

Then go to the folder where you want to upload your database, and click on the "Upload" button. I recommend that you place it in the "public_html" folder, which represents the root of your main site.

How do I import a large database onto cPanel LWS hosting?

Select your .sql file to upload and confirm.

How do I import a large database onto cPanel LWS hosting?

2. Access the cPanel Web Terminal.

Once the file has been uploaded successfully, return to the home page of your cPanel control panel by clicking on the cPanel logo at the top left of the screen.

How do I import a large database onto cPanel LWS hosting?

Then look for the "Advanced" section and click on "Terminal".

How do I import a large database onto cPanel LWS hosting?

3. Using the Web terminal, go to the folder where your SQL database export file is located.

When you open the web terminal, you are usually at the root level of your cPanel. However, as websites are stored in the "public_html" folder, it is common practice to download files to this folder.

To access this folder, you will need to enter the following command:

cd public_html

If you have placed your SQL export file in a specific folder, you can adapt the command accordingly. For example, if you have stored it in a folder called "folder_bdd" in the "public_html" folder, the command to enter would be :

cd public_html/dossier_bdd

4. Use one of the commands below to import your database

Enter the command below (excluding the first three lines, which are purely informative):

/* Replace user_base with the database user */ /* Replace base_name with the name of your database that you created just before */ /* Replace fichier.sql with the name of your file */ mysql -u user_base -p base_name < fichier.sql

How do I import a large database onto cPanel LWS hosting?

It will then ask you for the database password. All you have to do is type it in and press Enter (note that anything you type in at this point will not be displayed in the terminal).

Importing your database may take several minutes, depending on its size. As soon as a new line appears in the terminal, the import is complete.

Your database has been successfully imported onto your cPanel hosting. Don't forget to update the configuration file containing the connection information for your site or application, indicating :

  • Host: Localhost
  • Base: The name of the base you created on cPanel
  • Username: The username you created and linked to on cPanel
  • Password: The password you generated for the username.

Can LWS do this for you?

Yes, LWS can perform this task for you, but only through 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 in cPanel?

2mn reading

How do I manage MySQL databases with phpMyAdmin in cPanel?

2mn reading

How do I create a MySQL user account with limited privileges?

1mn reading

How to connect to a remote database in cPanel


Ask the LWS team and its community a question