Import a MYSQL Database: If you are a regular visitor to this blog, you will notice that for some time now, I have started talking more and more about server management.
In this article, I will tell you about 2 methods to import a very large database.
Usually, for the transfer of a database from one server to another, I connect to PhpMyAdmin, I export the file from the first server to my computer, finally on the second server, I import it. It worked wonders with 2.5, 7 MB, etc. databases.
2 Methods to Import a MYSQL Database
Recently, I had to import a database of almost 150MB, and the above method was unsuccessful, I spent a sleepless night searching and finally I found two methods to import a database large data:
- Importing a DB with the console,
- Import of a DB with the BigDump script.
For both methods, you should first create a database and write down the comic book name, user name and password.
How to import a large DB sql with the console
To import a database via SSH with the console, you must first upload the .sql file to the server, then connect to the server with PuTTY, and execute the following command:
mysql -uUSERNAME-pPASSWORDDATABASE Replace: Note: You must go to the directory where you uploaded the database and finally execute the command. If you have any issues importing the database, comment us in the comment box.How to import a database with the BigDump script