zcat /path/to/file.sql.gz | mysql -u 'root' -p your_database
>
will write the output of the mysql
command on stdout
into the file myfile.sql.gz
which is most probably not what you want. Additionally, this command will prompt you for the password of the MySQL user “root”.
Related Posts:
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- How do I restore a dump file from mysqldump?
- How do I import an SQL file using the command line in MySQL?
- How do I quickly rename a MySQL database (change schema name)?
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- Create a new database with MySQL Workbench
- How to get size of mysql database?
- 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 create a foreign key in phpmyadmin
- importing a CSV into phpmyadmin
- How to check if mysql database exists
- Is there a Profiler equivalent for MySql?
- How to do a batch insert in MySQL
- MySQL: Cloning a MySQL database on the same MySql instance
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Data is not constantly loading from custom wordpress table
- Why is my database import losing text widget data?
- What’s a good strategy for planning WordPress DB growth?
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- importing data from non-wordpress mysql db
- Import 10,000 Users into WordPress WITH a specific ID for each user
- MySQL Syntax Error upon restoring database from backup [closed]
- Error while importing database
- Unknown collation when I import a dump from an existing site into a development database?
- WordPress database import: Row size too large
- Create a form with custom autocomplete address field and CSV import values
- Migration problems with mysql: Operation not allowed when innodb_forced_recovery > 0 [closed]
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Exporting completed webiste for another server
- Export SQL query based on custom field?
- latency problems with wordpress install (from SQL import)
- Featured image from custom to WordPress database
- Weird characters displayed when importing WordPress MySQL db
- Importing Concrete5 content to WordPress
- mysqldump to a tar.gz
- Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ (38)
- Search for all occurrences of a string in a mysql database
- How to update a record using sequelize for node?
- Can’t open the mysql.plugin table. Please run mysql_upgrade to create it
- MySql: is it possible to ‘SUM IF’ or to ‘COUNT IF’?
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- How to unblock with mysqladmin flush hosts
- How To have Dynamic SQL in MySQL Stored Procedure
- MySQL – UPDATE query with LIMIT
- MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)
- Checking if Database Table exists
- Scanning Database for malicious Data
- Is it possible to define two databases for one installation?
- how to refresh wordpress permalink settings? (without admin panel)
- wpdb->prepare function remove single quote for %s in SQL statment
- Export WP database for import using WP-CLI on Vagrant Box
- Is it useful to turn on MySQL query cache for performance
- How To Make Connection To WordPress Data Base In A Plugin?
- Programmatically changing role information; editing role name and deleting
- How to force update all posts after import
- “MySQL server has gone away” since update to 3.8
- How to track a users progress through pages by inserting data into WordPress Database?
- Search and replace in post content
- How to add 2 hours to the wordpress time formed with current_time(“mysql”, false)?
- Is it possible to import a wordpress backup from a single site in to a multi-site configuration?
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- Importing users to Buddypress with custom fields
- Is it safe to convert tables from MyISAM to InnoDB?
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- Mysql SELECT posts
- Using GROUP CONCAT in my-sql query with wp_usermeta table
- #1115 – Unknown character set: ‘utf8mb4’
- How to add a private user page populated from sql?
- Migrating from PDO using SQLite to clean new install using MySQL
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- WordPress Block developer from exporting Database via PHP
- How do I display offsite database info on my wordpress site?
- SQL syntax error. However, it works normally at phpmyadmin
- string literals in query
- Editing mysql tables/database with wordpress or other app/cms
- WordPress database products structure
- Create pages from MySQL database
- Files on Localhost, Database on Server
- mysqli_sql_exception: Unknown column ‘wp_’ in ‘field list’ PHP 8
- DB prefix not updating
- Writing a function for WP Cron to run a SQL command daily
- Error establishing a database connection – WordPress setup, everything else is working
- Store GravityForm data in phpmyadmin (mysql)
- Find locations of all featured images of draft posts via SQL
- How To Upload Existing WordPress Site To WordPress Multisite Using SSH
- The function is deprecated; use mysql_real_escape_string() instead
- How can i syn wordpress user table with a stand-alone php script?
- insert data from a form:: Warning Empty query mysqli::query()
- How to change link in all posts?
- Mysql Queries per Visit – Crazy High
- WP_Query always returning the last custom post
- using same mysql user with many databases
- MySql Database In WordPress Multisite
- Insert double entry in DB
- Get data from 3rd table
- Custom wordpress SQL statement for a website
- Where is my mysql log on OS X?