How to use mysqlimport to read in result of mysqldump --databases

前端 未结 3 1206
醉话见心
醉话见心 2020-12-24 14:24

I have successfully dumped an entire MySQL database using

mysqldump --databases

generating a nice .txt file. However, I can\'t see how to r

3条回答
  •  感情败类
    2020-12-24 14:56

    I do this frequently:

    mysqldump -u username -p databasename > dump.sql
    

    To load:

    mysql -u username -p  targetdatabasename < dump.sql
    

    Switch -p instructs the database to prompt you to enter the password for the user username once the command launches.

    Your question is probably duplicate though.

提交回复
热议问题