It should be as simple as running this:
mysql -u <user> -p < db_backup.dump
If the dump is of a single database you may have to add a line at the top of the file:
USE <database-name-here>;
If it was a dump of many databases, the use statements are already in there.
To run these commands, open up a command prompt (in Windows) and cd
to the directory where the mysql.exe
executable is (you may have to look around a bit for it, it’ll depend on how you installed mysql, i.e. standalone or as part of a package like WAMP). Once you’re in that directory, you should be able to just type the command as I have it above.
Related Posts:
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- How to do a batch insert in MySQL
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- What’s the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN? [duplicate]
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- Case statement in MySQL
- Rename a column in MySQL
- Cannot delete or update a parent row: a foreign key constraint fails
- How do I import an SQL file using the command line in MySQL?
- #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
- How do I quickly rename a MySQL database (change schema name)?
- What does SQL Select symbol || mean?
- What is the definition of cardinality in SQL
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- When to use SELECT … FOR UPDATE?
- SQL Query Where Field DOES NOT Contain $x
- Create a new database with MySQL Workbench
- Error Code: 2013. Lost connection to MySQL server during query
- Column ‘user_id’ in field list is ambiguous
- How to join two tables by multiple columns in SQL?
- How to get size of mysql database?
- mysql Foreign key constraint is incorrectly formed error
- Selecting data from two different tables without using joins
- how to drop partition without dropping data in MySQL?
- MySQL: Invalid use of group function
- Creating a search form in PHP to search a database?
- Getting “Lock wait timeout exceeded; try restarting transaction” even though I’m not using a transaction
- Simple Random Samples from a Sql database
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- What does SQL clause “GROUP BY 1” mean?
- SQL ZOO List each continent and the name of the country that comes first alphabetically
- How can I prevent SQL injection in PHP?
- Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root
- Generating a random & unique 8 character string using MySQL
- SQL select only rows with max value on a column
- Unknown Column In Where Clause
- SQL statement not working – “Operand type clash: date is incompatible with int’
- Convert partially non-numeric text into number in MySQL query
- Repair all tables in one go
- MySQL equivalent of DECODE function in Oracle
- How can I search (case-insensitive) in a column using LIKE wildcard?
- How to create a foreign key in phpmyadmin
- importing a CSV into phpmyadmin
- How to check if mysql database exists
- #1062 – Duplicate entry for key ‘PRIMARY’
- Is there a Profiler equivalent for MySql?
- ERROR 1115 (42000): Unknown character set: ‘utf8mb4’
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- Remove Primary Key in MySQL
- MySQL: Cloning a MySQL database on the same MySql instance
- Is merge statement available in MySQL
- How to get the count of each distinct value in a column?
- Data is not constantly loading from custom wordpress table
- How do you properly prepare a %LIKE% SQL statement?
- What SQL Query to do a simple find and replace
- What’s a good strategy for planning WordPress DB growth?
- Optimize WordPress Query that take 5 seconds to execute
- Scanning Database for malicious Data
- Getting wrong relationship value in $args in wp_Query?
- wpdb->prepare function remove single quote for %s in SQL statment
- “#1067 – Invalid default value for ‘post_date'” when trying to reset AI after backup
- Inserting Post Meta From SQL
- How to Join two tables from separate databases within WordPress
- Extending the database
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Size article thumbnails and retrieve them directly from database
- wpdb_prepare with multiple or condition
- How do I find which articles are missing a featured image in The WordPress database?
- SQL Error wp_commentmeta – incorrect table definition
- How to find meta entries with their posts missing via SQL?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- Database Tables Lost Indexes? How to Recover?
- SQL Database, repeated tables?
- Create table from array with prepare
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- Code to remove authors with no posts connected to them
- SQL command to convert all tags in lowercase?
- Which is better and faster ? WordPress Queries or SQL Query
- SQL Query in WordPress – Getting Impossible WHERE error
- Why this query is not showing any result on wordpresss home page?
- Using AND and bracket grouping in SQL not working
- Why does changing Database Table Prefixes result in loss of content?
- How to get INSERT errors from $wpdb?
- SQL query to set posts in bulk based on the post content
- WP MultiSite: Can’t select database error after changing to new domain
- MySQL query for taxonomy-meta
- How can I write a formal sql query to get data from a custom table
- $wpdb->get_var – What value is returned when zero records are found?
- latency problems with wordpress install (from SQL import)
- Data is not constatntly loading from custom wordpress table