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
- How do I import an SQL file using the command line in MySQL?
- How do I quickly rename a MySQL database (change schema name)?
- What does SQL Select symbol || mean?
- 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
- Getting “Lock wait timeout exceeded; try restarting transaction” even though I’m not using a transaction
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- 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
- 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
- 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?
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- MySQL: Cloning a MySQL database on the same MySql instance
- How to get the count of each distinct value in a column?
- Data is not constantly loading from custom wordpress table
- 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
- Extending the database
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- 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?
- 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)?
- 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
- 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
- $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
- DB prefix not updating
- Performing CRUD operations on front end in wordpress
- Lock wait timeout exceeded; try restarting transaction
- Find locations of all featured images of draft posts via SQL
- SQL query to change custom field in WordPress database
- How to show result of sql query in a page?
- How to create index (sql) to a meta_key?
- The function is deprecated; use mysql_real_escape_string() instead
- WPDB delivers wrong results from complex queries
- How to change link in all posts?
- Display MySQL as part of a Page
- $wpdb post type and term query only works when there are no dashes or spaces in the term slug and title
- can’t delete a row from post_meta table
- get_results() query not working only when entering strings
- SQL error on restoring database
- Query sql for truncate post_content in wp_posts table
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- export individual posts to text files or a single csv file
- Delete posts with word count less than x number of words
- SQL – Pull products of particular category from a remote WordPress woocommerce db
- SQL command to export post_content from wp_posts using phpMyAdmin
- why you don’t Implement PDO for access every thing to database
- SQL get last entry of a specific gravity form
- How do I load a sql.gz file to my database? (importing)
- Is there an equivalent of MySQL’s SHOW CREATE TABLE in Postgres?
- Possible SQL injection. How to locate and fix?