import DB through mysql console

# if your database is not locally hosted
mysql -u username -p -h dbhost dbname < filename.sql

4.25
4
Phoenix Logan 186120 points

                                    mysql&gt; use db_name; 
mysql&gt; source folder_path/file_name.sql;

4.25 (4 Votes)
0
3.75
4
Krish 100200 points

                                    mysql -u username -p database_name &lt; file.sql

Note-1: It is better to use the full path of the SQL file file.sql.
Note-2: Use -R and --triggers to keep the routines and triggers of original database.
		They are not copied by default.
Note-3 You may have to create the (empty) database from mysql if it 
		doesn't exist already and the exported SQL don't 
        contain CREATE DATABASE (exported with --no-create-db or -n option), 
        before you can import it.

3.75 (4 Votes)
0
3.33
3
Awgiedawgie 440215 points

                                    mysql&gt; use db_name; 
mysql&gt; source file_name.sql;

3.33 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
import mysql from file .sql importing into mysql import database mysql server mysql import table from sql file import sql file into mysql command line mysql db import import database using mysql command line mysql command for import database mysql import file sql mysql shell import sql file mysql command to import sql database terminal import mysql database import mysql database cli source import database command mysql import database to mysql command line console import using mysql console how to import sql file in mysql through command prompt how to import db in mysql import mysql database server terminal import mysql database using terminal ubuntu import database from database files mysql ubuntu import with mysql query query to import a database in mysql mysql &gt; command to import database mysql import database from terminal import database from sql file mysql how to import .sql file in mysql query browser import mysql database command line ubuntu server import mysql .sql file console import database mysql from mysql terminal import sql file in mysql by command line using mysql command line to import database how to import sql file in mysql with sql command mysql import to a specific database command line ubuntu import database in mysql terminal mysql sql to import file from server mysql to import file from server import sql file to mysql database linux import database mysql from file import database mysql from sql file import to my sql import mysql database cli mysql command to import database from .sql file import mysql file into database from terminal import sql files to mysql how to import .sql file in mysql from command line mysql console import sql file source how to import database in mysql in ubuntu terminal mysql import file command line import database to mysql using cmd sql server import mysql mysql import sql on command line mysql import sql files to databases command line sql import mysql file mysqlimport to import sql file to database db import command mysql mysql import sql query to another sql file Fastest Way to Import a .sql file into MySQL import .sql file in mysql db import sql file using mysql command line import database file in mysql command line how to import data from sql file in mysql mysql import mysql how to import from .sql file in mysql\ mysql import from can import db in mysql mysql console to import database importing file on mysql import mysql linux command script to import mysql how to import database in mysql using terminal mysql to sql import mysql sql file import command line in my sql nbash import sql file mysql import sql from cmd mysql import sql file query how to import an sql file in mysql mysql db import command import mysql file mysql import sql file cmd how to import a file into mysql database sql file import to mysql mysql use import file how to import mysql file from console how to import database in mysql linux import via mysql console mysql import sql file have to import sql in mysql import a db in mysql import mysql database in terminal ubuntu import mysql database command line import sql file in mysql linux how to import a database in mysql using command line importing mysql database cmd mysql database import import database in mysql via command mysql importing a db import database from mysql terminal mysql console import db import database into mysql command line how to import mysql file in mysql import database mysql command line linux source import database mysql command line ubuntu source ubuntu mysql import sql file with database name run mysql import database command in bash script import db in mysql terminal line mssql linux import from mysql database sql file import in mysql mysql import sql file server import .sql into database mysql import mysql database to sql server how to import a database in mysql cli how to import db to mysql import sql file mysql command line ubuntu import db file mysql import sql file in database engine mysql import file mysql mysql import sql file linux importing mysql database using command line mysqlsh import sql file import mysql from database mysql import db command line in linux server import a database mysql command line importing sql file mysql import file sql to mysql cms how to import sql file in mysql with command line ubuntu import mysql database file importing sql file into mysql import sql database in mysql server how to import mysql database import a database mysql linux terminal import sql database mysql how to import sql file in mysql cmd import a database to mysql command line mysql command to import from sql file mysql to import sql file mysql import database from cli import mysql file to mysql mysql import .sql file import sql file to database mysql import mysql. file import my sql file import sql with mysql how to import from sql to a db mysql import db from file mysql import file mysql command importing database into mysql data import from sql server to mysql mysql import database command line how to import database in mysql from terminal import db in mysql mysql cli import database import function sql mysql windows mysql import sql file database import command mysql mysql import data from sql server import sql file mysql comand how to import database mysql manually import mysql database how to import database in mysql cli import sql file to mysql database command line how to import database using command line in mysql import to mysql import db using mysql command line which data can mysql import import database using mysql ubuntu mysql import database command line ubuntu import db file mysql from terminal command to import mysql database import db to sql file mysql import mysql database ubuntu terminal mysql how to import sql import .sql file in mysql database import data mysql import sql with mysql command line mysql ubuntu import database mysql terminal import database how to import an sql file into mysql how to import mysql database in linux command to import mysql database throught command how to import mysql ubuntu mysql import database from file how to import sql file mysql importing database mysql How do I import an SQL file using the command line in MySQL? how to import a sql file into mysql via command line import mysql database in command line mysql database import command import database from mysql command line import database use commande mysql mysql import sql fie import mysql through console mysql import file to database import db file into mysql import sql file in mysql using terminal how to import sql file in mysql command prompt how to import sql server database to mysql mysql db import command in linux mysql import database sql file import db in mysql from sql file in linux mysql prompt import file sql import database mysql command line source import sql file into mysql database mysql import database cli shell execute to import mysql db import db in mysql terminal mysql import .sql how to import a database in mysql import sql database command line can I import a database to mysql without terminal mysql import sql file import database mysql command how to import .sql file in mysql command line How to import a DB into sql server mysql import sql file from command line import sql to mysql db open database without mysql running how to import .sql file into mysql using the command line how to import file in mysql mysql database import mysql import sql from command line mysql import db file mysql command to import data from sql file import database mysql terminal import sql file mysql cmd import database mysql ubunut import sql to db mysql mysql command import sql file mysql import sql to database import db to mysql import db mysql terminal import data from sql file to mysql command to import sql file in mysql import database mysql ubuntu terminal mysql how import sql file mysql import sql file to table import sql file linux mysql import sql file to mysql on terminal mysql import sql table mysql import a file import sql from console mysql import mysql db linux db import mysql linux command line mysl import database import sql database in mysql import a db mysql import an sql file into mysql command mysql import sql file example mysql command line import sql file how to import mysql from sql import db mysql from inside import db mysql ubuntu import mysql database import mysql database mysql to import database import a database in mysql command line myslq import sql importsql file mysql import mysql database command line import mysql import .sql files to MySQL import sql to mysql how to import sql database in mysql mysql import database import sql mysql cmd import database command line mysql mysql import database from file in linux command line import db mysql command line ubuntu import data mysql to sql server import sql server database to mysql import mysql database with terminal ubuntu import mysql database command line import database file from cli in mysql mysql import db import database mysql import export database mysql import import .sql file mysql import sql fil to mysql how to import sql script into mysql database mysql command import database ubuntu server importing mysql import mysql from sql file import database with mysql import mysql file terminal ubuntu mysqldump import sql file import database mysql linux import sql data linux mysql load database mysql source sql file import file mysql command line mysql how to import database mysql command line import with output import database mysql how to import . sql file in linux import sql script shell how to import sql file to mysql database import db using source command import mysql file mysql import via command line how to connect to a sql file using mysql import sql file in mysql command mariadb import sql file into db from command line mariadb import sql from command line import sql to mysql command line use db.sql to load database.db mysql syntax import database import database in command line mysql import_script.sql how to import data using a query mysql use dump sql how to import sql file in mysql ubuntu server script to import from sql file mysql upload mysql to database load .dump file in sql sql import sql cmd Mariadb linux SQL file to database how to import database in mysql using command line in ubuntu mysql dump database to file command line import sql in mysql command line upload database sql commands how to add file mysql using command line import db to mysql ubuntu how to use an sql file mysql import database source mysql import by terminal import .sql file to database how to import mysql dump using command line db import command how to import sql database in command line how import command mysql.sql mysql server import sql file command line sql import mariadb import sql import data command line mysql mysql windows import sql file mysql import sql file to specific database import a db cli sql dump to sql platormsh import sql dump platormsh insert sql dump how to import database in mysql command line how to import database script in mysql how to import database in mysql using terminal local to server e import sql in mysql ubunto dump sql file to database mysql upload database to mysql cmd importing database file to mySql database import upload sql file using cmd importing database through mysqldump dump sql database through mysl command line import mysql file into database ubuntu how to open sql file in mysql how to import a database in mysql ubuntu load dump sql MYSQL connect a dump file to databe import DB through mysql console import database using cmd mysql import through cmd load a dump in mysql how to load a dump to mysql? mysql command line import database import sql database on mysql import a sql database with mariadb import sql database to shell sql import file to shell improt mysql dump command line linux commandline import sql file into database mysql command import .sql file mysql import backup file command line import database mysql cmd import external sql file mariadb database import sql file in mysql cmd import sql file into cmd sql import mysql data to mysql import mysql dump to mysql import linux command prompt mysq; import into mysql without gui import mysql command line how to import .sql file to mysql how to import sql file in phpmyadmin using command line connect an sql file to mysql windows mysql command line import import sql file through command prompt how to install .sqlfile cmd how to import db in mysql using cmd how to import db dump mysql command line import file use sql file to import in database using linux terminal mysql import cmd how to import sql dump in mysql import data into mysql from sql file using source import data into mysql from sql file upload sql dump file mysql sql import sql file with source command sql import sql file source import database mariadb standard sql import from command line linux import database mysql import sql via cli how to import sql file in mariadb locally how to import sql file in mariadb how to import database in mariadb sql import command use .sql file in mysql mysqldump command to import sql file upload from mysql dump cli import mysql database add sql using terminal import command to data base cmd mysql cmd import file import db using cli import database from command line mysql mysql use file sql import mysql database command line ubuntu import database mysql command line ubuntu load sql file into mysql command line how to import the full sql dump database how to load the dump folder with sql files how to load data from sql file to a database how to upload the mysql file using CLI ubuntu import into mysql how to import mysql database using command line windows 10 import mysql db command line mysqldump import file import sql file from command line how to import data from mssql to mysql import the db through command line import database with command line in mysql mysql import database from file import .db file in mysql mysql root ubuntu import .sql file command line import database mysql how import excel file in mysql mysql import database by file how to import sql file dump mysql iport sql from command line import db dump into this database.. mysql import table in database mysql load dump file how to import sql file in mysql using cmd sql command for import .sql file in sql import .sql file in sql comand promt import large database command how to import a database dump into mysql import .sql file impotrt database sql command mysql cli import sql how to get .sql file in mysql how to import mysql database in sql server import sql file in existing table command line import database mysql command line phpmyadmin load sql file import sql file laod database from sql import data directly from sql file importing db in mysql mysql dump import database mysql command line import from sql file import sql in mysql server .sql file to db import database mysql ubuntu centos import mysql file centos mysql import file db file load from sql file db file load from sql mariadb export database sql dump import .dump import mysql how to insert a sql dump to mysql sql import .sql file import db from command line import sql file mysql ubuntu import sql file to mysql ubuntu import database mysql ubuntu command line import data sql via command line ubuntu database import from .sql file + commad import the db via command line how to import sql dump file to mysql database in windows how to import sql file in mysql in centos 7 .sql file in mysql import .sql file to my sql database mysql import command ubuntu mysql import command import sql file in mariadb import sql in cmd how to import file to mysql server import mysql database from command line ubuntu dump maria db virtual env to mysql importing mysql dump import db in mysql command line import database dump mysql how to create sql file in mysql terminal load sql file into mysql mariadb load .sql mariadb load .sql file mysql dump import database command line mysql dump import sql file mysql datadump import mysqldump is required for import sql load a sql file into mysql mysql import to database command to import database in mysql mysql how to improt database over cli how to import database over cli how to import mysql database .sql database how to import sql file in myslq cli mysql 8 import sql file how to import sql to mysql how to import from mysql dump mysql importing mysqldump mysql debian 10 import database how to import sql file in mysql via command line in windows 10 mysql import database from command line ubuntu mysql load sql file import large mysql database command line ubuntu mysql dump import how to source .sql file in mysql how to extract .sql file in mysql mysql load database from file iportdatabase mysql command export mysql database command line centos mysql import command line windows mysql command line import database mysql import database from sql file mysql import sql file terminal import .sql to mysql server how to import .sql to mysql database commandline How to import .sql to mariadb import data mysql command line how to import mysql dump from command line windows import sql file in mysql command line windows - Populate database using script psql file dump import sql file into mysql database command line import sql dump mysql sql file import to database terminal how to import and export database in mysql using command prompt importing database in mysql terminal import sql files in mysql mysql import sql console import sql mysql import sql dump in mysql import .db mysql mysql inport command line mysql import command li ne load sql from command line mysql import .sql with cmd line mysql upload query .sql file for import mysql insert from .sql file how to load a sql file in mysql how to upload sql file in mysql mysql import database command how to import .sql file in mysql ubuntu centos import dump database centos export database import db cmd import a sql file in mysql command line from DB_CHANNELSEQUENCE import * import sql file mysql console mysql import database command line import mysql 10 dump how to import sql file in database how to import .sql files into mysql import mysql file into database .mysql file to .sql file .mysql to .sql linux file import db using cmd mysql load database from sql file trying to import a mysql file through command line mysql import from file centos import file in database mysql how to import database in mysql in shell how to import database in mysql mysql import from command line import sql to database mysql console import sql file how to import sql file to mysql usingin python import sql in mysql import mysql database using command line mysql data import command line import database mysql file on name import database mariadb command line read sql file mysql import database mysql debian mysql import commandline import sql file mysql windows command line importing a sql file into mysql import mysql file command line mysql import sql dump how to import sql script with mariadb-import.exe how to import sql script using mariadb-import.exe import sql file in mysql using python how to source sql file in mysql mysqldump import sql import db mysqldump load from file how to import sql file command line importing sql file into mysql command line load mysql database export sql desde terminal mariadb mysql command import load database from sql dump how to dump sql file to database using mysql how to dump sql file to database how to use a dump.sql file how to import dump file to mysql import database mysql shell mysqlimport sql file shell import databases mysql command line import database command line ubuntu import data from mysql dump mysql import command line not working load from sql dump import dump into mysql import dumb mysql how to import .sql file in mysql linux mariadb import .sql file mysql command line insert sql file import data into mysql command line mysql terminal import sql file ubuntu mysql import database how to insert a mysql dump file using mysql shell how to insert a mysql dump file sql import data from dump fi;e mysql import 132M of file import db .sql import database with command line mysql mysql source load file mysql import local sql file mysql upload local sql file mysql 5.7 import sql file import database from file in mysql sql import file.sql to database import database into mysql options mysql sql file import sql file how to insert .sql file in mysql how to import sql dfile in mysql import database mysql from command line import database mariadb command line ubuntu how to import the sql file in mysql how to import sql in command line how to import mysql file in phpmyadmin cmd' import sql file in mysql using cmd how to import database in mysql by cmd import.sql using command import sql file into mysql with command line import mysqldump import sql into mysql commandline import sql file in database using command line load database to mysql open sql file on the command line mysql where should I import from add sql file to database import sql db commmand how to import database in mysql ubuntu terminal import db from cmd mysql mysql command line import data mysql import in database command line how to run sql dump in mysql how to upload sql files how to import from mysql to sql import sql file mariadb import mysql from file how to dump sql file into mysql database using command line sql import commands import sql dump ubuntu how to run import database in phpmyadmin using cmd import data sql into mysql import sql files in mysql upload a sql file mysql import mysql qury in commandline mysql 5.7 import database using command line how to import a sql file in mysql mysql import from sql mysql dump import mysql dump import ubuntu import file into sql konsole mysql install database from sql file how to import sql file in centos import database mysql command line local to server ubuntu import database to mysql how to load a .sql file into mysql sql load sql file mysql import .sql command line mysql import sql file linux command line import database mysql ubuntu server mysql import in sql import sql file sql command how to import a db from a file on mysql how to import large sql file in mysql with command line import db from sql file command importa database with command how to import mysql database from command line command line import new mysql linux sql import how to import a db in sql from a file import sql dump in mysql temrinal mysql import sql file data into table mysql how to import files windows mysql how to import files import database via command line create a db and import a db how to import a sql file data mysql import database dump how to import mysql dump command import sql file to mysql file mariadb import dump file sql import data command mysql dump file to database windows 10 load import sql file into database import backup mysql command line import sql file from cmd importing a particular database using command line mysql mysql won load sql file import data using cli import mysql database via command line mysql import sqq mysql console create database and import file mysql command to import sql file import db fom cmd mariadb import sql dump import sql file mysql command line how to Import the file database.sql in your mySQL. import databasse use mysqldump import an sql file to a database command import mysql dump shell centos 8 mysql import sql file import sql file into mysql centos 8 insert sql file into mysql database command line import mysql database large using cmd without database db import command in linux mysql sql import database import sql linux how to import sql data into database mysql import sql file in mysql using command line import database query mysql import database files mysqlsql import dump mysql import with cmd import dump in mysql import sql file command line phpmyadmin import database from mssql commandline insert via sqldump to db cli import db dump from mysql mysql 5.7 export database into mariadb read .sql file into database cli import sql db to server improt sql command line load data into mysql from sql file linux import a mysql table between different mysql databases import database ubuntu phpmyadmin import database command line phpmyadmin inport database command line how to import sql statements load database in mysql import a document in mysql command line linux load database mysql import a database command mysql load from sql file mysql import in file sql import database command line how to import .sql file into mysql database in windows import sql file in mysql ubuntu mysql ubuntu upload mysqldump import database Import sql files to create tables in mysql. mysql import database dump command line mysql import sql file verbose import database mysql command line problem import mysql command line ubuntu How to import large sql files into MySQL using the command line import sql file in mysql command line mysql import command sql file import mysql database from cmd open sql file in mysql how to import a sql file into mysql import db using cmd step by step import database in mysql command line mysql load database to file command line how to import database in linux server how to use a .sql file in mysql import db mysql shell how to import database in mysql using cmd mysql command line import dump mysqlimport sql file load mysql dump fil import mariadb database import database into another database using sql file import sql file into database command line how to import database file in mysql mysql import dump file command line how to import .sql file in mysql cli import dump file mysql command line mysql cli import db import dump mysql mysql import database by command line how to dump a sql file in mysql database source import sql how to import sql database command line how to import sql file to mysql mysql import sql file using cmd import sql file into database mysql how to import database in mysql command line in ubuntu sql upload file to database use terminal how to import .sql into mysql mysql database import command line mysql command import .sql sql import dump mysql insert db file mysql import from sql file how to open .sql file in mysql import database from camd import db mysql command line import sql file terminal mysql command import sql file to database how to run a sql datadump mysql install dump load mysql dump mysql sql import how to export the table data in mysql in centos 7 mysql command line import sql mysql import through command line import file into database mysql import mysql database dump command line import mysql ubuntu how to import .db file in mysql mysqlimport how to import from sql file mariadb command line import sql file import sql mysql terminal import .sql to my database how to import .sql file in mysql using mysql mysqldump how to import .sql file in mysql how to imoprt database into mysql db from vcmd export mariadb to mysql command line file to import mysql mysql import dump command line file to import in mysql how to import dump file in mysql load mysql from sql file mysql read .sql file dump sql file to database mysql load dump mysql import sqll file import sql database from file importing .sql file into mysql import db msql upload import sql file into mysql and keep existing database cmd command to import mysql database import .sql file into mysql mysql import sql file command mysql insert sql dump how to import dump file in sql how to load mysqldump to a specific database from command line how to import mysql database command line created databse from cmd, where is the .sql file? how to import an sql file in mysql from command line mysql import database mysql mysql load sql file into database import sql file using command line upload .sql using cmd .sql import linux source db dump into database MYySQL dumb import file import data mysql from file import databse mysql windows import databae mysql command line mysqli import sql file cli dump .sql file in mysql how to import SQL document to mysql mysql how to import sql file sql server how to import database using cmd how to import a SQL file into mysql command line import db command line how to connect sql file in mariadb import .sql mysql sql file myssql read sql file mysql ubuntu mysql upload sql file mysql load db from file how to open sql file in mysql command line import database file to mysql import into mysql from command line import sql dump through command mysql import from file sql import from sql command import sql file mysql terminal load db dump mysql importing mysql database command line import .dump as sql mariadb import sql file mysql opend sql file excute sql import database linux command line import mysql database mysql import db dump import mysql cmd mysql import sql file source mysql import sql file but use selected database mysql import sql file to database import an sql file to a database mysqli commands line import import mysql cli linux import database command line import file into mysql database mysql load sql file how to import sql file in mysql terminal how to import db msyql commandl ine import mysql cli import .sql file in mysql cli import sql file import .sql file in mysql command line how to import sql file in mysql mysql sql import command line without mysql sql import command line mysql .sql import how to source an sql file into an existinf database terminal command to create database by sql file how to use .sql file in mysql import sql command line how to import mysql file from command line import mysql file to database import mysql dump command line centos import sql file how to import sql in mariadb using terminal how ti import sql file in ubuntu terminal import mysql file in db mysql load database from dump import sqldump import sql dump mysql linux import sql file terminal sql upload .sql import sql into mysql server how to import a dump sql file in mysql-server mysql how to load data from sql import database from dump in mysql mysql import import sql database in mysql command line pg_restore sql file how to import sql file into mysql how to import db file in mysql command mysql import sql file import swl database commandline linux mysql import sql file import sql import mysql db cmd import sql db cmd import sql file in mysql sql file to database import sql file mysql mysql import dump mysql import sql command line how to import mysql database using command line mysql import data dump mysql import sql mysql impoirt viua cmd impoprt sql msql\ apply sql file to mysql server add .sql file to database how to add .sql file in mysql import sql file to mysql mysql import cli impoer mysql database from cmd mysql load sql from file how to dump sql file in mysql mysql import db command line import database mysql command line import sql file into mysql import file in mysql mysql create database from sql file command line mysql import db command importing a database in mysql import mysql from command line insert sql file into mysql database import from sql file mysql how to import sql file in mysql linux mysql import sql file command line import sql file into mysql using command line import a sql file in a folder in mysql windows import a sql file in mysql read a .sql file in another sql file in mysql how import sql file to import in mysql source mysql import file import mysql dump mysql import sql file
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source