how do I import a large database to phpMyAdmin?

How to import a large database in phpMyAdmin,I have it about 800Mb, how to do it using Terminal in Mac OS?

Author: radion_dev, 2015-11-25

4 answers

Import a large database using the console (terminal):

1) You need to upload the file with the database dump to the VPS. To do this, you can use an SFTP connection with root rights.

After establishing an SFTP connection, copy the sql file to any directory on the server, for example, /root.

2) Now connect to the VPS via SSH-console with root rights. This level of access you get by default, ordering any hosting of virtual servers.

Connecting to the MySQL server with the command:

Mysql-u root (The username you use to log in to phpmyadmin) –p

For example, mysql -u oleg-p

Enter the password of the mysql user root and press Enter. As a result, the console will display the greeting " Welcome to the MySQL monitor."with the session id and MySQL version specified.

3) Go to the created database using the command:

USE database_name (database name)

For example, USE nano (base name of data)

4) To import a database dump, use the source command. In the case of the database.sql file, the command will be as follows:

Source /root/database.sql;

A visual example of executing this command is shown below:

Mysql> source /root/database.sql; Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Database changed Query OK, 0 rows affected (0.01 sec) Query OK, 4 rows affected (0.01 sec) Records: 4 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql>

Photos #1

Photos #2

 2
Author: Артём Похила, 2018-08-07 18:40:56

Console command for importing a database from an sql file

mysql -u[username] -p[password] db_name < dump.sql
 3
Author: Marsel Arduanov, 2015-12-02 13:22:20
  1. Try to make a dump in Sypex Dumper instead of phpMyAdmin, and use it to fill it on the target server. It is capable of carrying gigabytes of information.

  2. The mysql utility included with the server. Old dock
    You may have to specify host, username, and password in the mysql parameters in addition to

 2
Author: Алексей Присяжный, 2017-05-23 12:39:07

In the terminal, open the php.ini file -> sudo gedit /etc/php5/apache2/php.ini

In which you change the values to:

; Maximum allowed size for uploaded files.

Upload_max_filesize = 200M

; Maximum size of POST data that PHP will accept.

Post_max_size = 200M

; Maximum execution time of each script, in seconds

Max_execution_time = 600

; Maximum amount of time each script may spend parsing request data

Max_input_time = 600

; Maximum amount of memory a script may consume (128MB)

Memory_limit = 500M

After restarting the server -> sudo service apache2 reload . We make imports. The output is 200Mb, you can change the values if necessary.

 2
Author: ultimatum, 2016-09-13 11:34:34