From the mysql console:
mysql> use DATABASE_NAME;
mysql> source path/to/file.sql;
make sure there is no slash before path if you are referring to a relative path… it took me a while to realize that! lol
More Related Contents:
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Error Code: 2013. Lost connection to MySQL server during query
- MySQL Trigger after update only if row has changed
- Error creating table: You have an error in your SQL syntax near ‘order( order_id INT UNSIGNED NOT NULL AUTO_INCREMENT, user_id ‘ at line 1 [duplicate]
- MySQL Query to select data from last week?
- Using an Alias in SQL Calculations
- Can a table field contain a hyphen?
- Adding a leading zero to some values in column in MySQL
- View’s SELECT contains a subquery in the FROM clause
- Check for x consecutive days – given timestamps in database
- MySQL Insert Into from one Database in another
- How do I get the ID of multiple inserted rows in MySQL?
- How to insert data to MySQL with auto-incremented column(field)?
- Case statement in MySQL
- Replace Into Query Syntax
- How to produce “phantom read” in REPEATABLE READ? (MySQL)
- Laravel join with 3 Tables
- Difference between two table structure
- MySQL query, MAX() + GROUP BY
- ERROR 1148: The used command is not allowed with this MySQL version
- How to insert a file in MySQL database?
- How to get multiple records against one record based on relation?
- MySQL equivalent of Oracle’s SEQUENCE.NEXTVAL
- Foreign key constraints: When to use ON UPDATE and ON DELETE
- Where does MySQL store database files on Windows and what are the names of the files?
- How to use a user variables in MySQL LIKE clause?
- How to speed up sql queries ? Indexes?
- MySQL: Computed Column
- Optimistic locking in MySQL
- mySQL SELECT upcoming birthdays