devxlogo

Import Large SQL Files into MySQL

Import Large SQL Files into MySQL

Do you want to import data from a large SQL file into MySQL? Using the following mechanism, you will be able to import it with the file filename.sql. Just follow the steps listed below:

//Connect to mysql[root@dev]# mysql -S /opt/mysql/aordb/mysql.sock -u -p //Select the database that you want to use[root@dev]# use //Use the source command to import the file. Here the assumption is that the file filename.sql is present from the folder where you have tried to connect to mysql as in line # 1[root@dev]# source filename.sql;
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist