Home >Database >Mysql Tutorial >How to Import Large SQL Files into phpMyAdmin When Facing Upload Size Restrictions?
Importing Large SQL Files into phpMyAdmin
Importing large SQL files into phpMyAdmin can encounter limitations due to the application's upload size restrictions. To overcome this issue and import files that exceed the supported size, consider executing the import from the MySQL console using the command line.
Solution:
Connect to the MySQL console:
mysql -u [DB-USER-NAME] -p [DB-NAME]
Replace [DB-USER-NAME] with your database username and [DB-NAME] with the name of the database you want to import the data into.
You will be prompted to enter your password.
Import the SQL file:
< [db.file.sql path]
Replace [db.file.sql path] with the full path to your SQL file.
(Optional) Specify the host:
mysql -u [DB-USER-NAME] -h [MySQL-SERVER-HOST-NAME] -p [DB-NAME] < [db.file.sql path]
Replace [MySQL-SERVER-HOST-NAME] with the hostname of your remote server.
The above is the detailed content of How to Import Large SQL Files into phpMyAdmin When Facing Upload Size Restrictions?. For more information, please follow other related articles on the PHP Chinese website!