backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
This will do,
If your requirement is to dump data alone then go for this,
To export to file (data only)
mysqldump -u [user] -p[pass] --no-create-db --no-create-info mydb > mydb.sql
Related Contents:
- How can I convert an MDB (Access) file to MySQL (or plain SQL file)?
- How do I import an SQL file using the command line in MySQL?
- What’s the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN? [duplicate]
- SQL select only rows with max value on a column [duplicate]
- ROW_NUMBER() in MySQL
- What’s faster, SELECT DISTINCT or GROUP BY in MySQL?
- MySQL CONCAT returns NULL if any field contain NULL
- “where 1=1” statement [duplicate]
- UPDATE multiple rows with different values in one query in MySQL
- MySQL Like multiple values
- Ordering by the order of values in a SQL IN() clause
- Unknown column in ‘field list’ error on MySQL Update query
- Convert partially non-numeric text into number in MySQL query
- Generating a random & unique 8 character string using MySQL
- Using DISTINCT and COUNT together in a MySQL Query
- What’s the difference between comma separated joins and join on syntax in MySQL? [duplicate]
- MySQL Query to select data from last week?
- Replace Default Null Values Returned From Left Outer Join
- MySQL DELETE FROM with subquery as condition
- How to insert data to MySQL with auto-incremented column(field)?
- How to remove unique key from mysql table
- Combining UNION and LIMIT operations in MySQL query
- How to round down to nearest integer in MySQL?
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- Strip last two characters of a column in MySQL
- MySQL: How to insert a record for each result in a SQL query?
- #1025 – Error on rename of ‘./database/#sql-2e0f_1254ba7’ to ‘./database/table’ (errno: 150)
- Use LIKE %..% with field values in MySQL
- GROUP BY having MAX date
- MySQL : ERROR 1215 (HY000): Cannot add foreign key constraint
- How to count the number of instances of each foreign-key ID in a table?
- mysql SELECT IF statement with OR
- SQL SELECT LIKE (Insensitive casing)
- Drop MySQL databases matching some wildcard?
- How to insert columns at a specific position in existing table?
- MySQL order by “best match”
- MySQL: View with Subquery in the FROM Clause Limitation
- Insert and set value with max()+1 problems
- mysql count group by having
- Setting value for one column of all records in table
- How do I count columns of a table
- How do I generate a SQL script from my diagram in MySQL Workbench?
- How to get list of dates between two dates in mysql select query [duplicate]
- updating columns with a sequence number mysql
- When running UPDATE … datetime = NOW(); will all rows updated have the same date/time?
- MySQL export into outfile : CSV escaping chars
- How to SUM and SUBTRACT using SQL?
- SQL query to prepend prefix to existing value in a field
- MAX function in where clause mysql [duplicate]
- Dump File MySQL 5.6.10