D
D
dm2018-11-20 15:23:09
MySQL
dm, 2018-11-20 15:23:09

How to export a database via SSH (mysqldump)?

To export the database, I do the following I
connect to the database I
mysql -u [dbuser] -p [dbname]
enter the password
password
I export to the database.sql file
mysqldump -u [dbuser] -p [dbname] > database.sql
A symbol appears on the command line ->and the database is not exported. Is there anything else that needs to be done?
5bf3fc5327455013113907.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vreitech, 2018-11-20
@Chekhoved

you don't need to connect to the database. mysqldump -u [dbuser] -p [dbname] > database.sqlshould be done in bash, not in mysql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question