MySQL backup database

后端 未结 8 1676
情深已故
情深已故 2021-01-06 23:56

I tried to backup the database from my mysql server.

I am using MYSQL 5.5.

I used the following Command to backup the database.

            $         


        
8条回答
  •  Happy的楠姐
    2021-01-07 00:32

    The mysqldump command accesses a program and is not called in the mysql command prompt.

    It basically does a big SELECT * FROM tables... query and echos the output in your terminal, which is why you redirect the output to save it to a file.

    You need to find the direct path to the mysqldump.exe file and then execute it that way.

    C:\...\path\to\mysql\bin\mysqldump.exe -uroot -p DATABASE_SCHEMA > C:\backup.txt

    Only include the -p flag if your mysql root user account has a password and replace the DATABASE_SCHEMA text with what your database name is called.

提交回复
热议问题