1

Is there any way to export a MySQL database using MYSQL Command Line Client?

I have a database named as naukri_portal, which contains 3 tables. I am trying to export the database using MYSQL Command Line Client but it didn't work.

mysqldump -u root -p naukri_portal > naukri_portal.sql
farhanlq
  • 71
  • 4
  • 16

1 Answers1

3

you can use this command which will ask for a password and download your database into the current directory

 mysqldump -u root -p database> dump.sql

if you are form windows use PowerShell administrator mode and if you are using Linux use Sudo command. Then run those query.

You can also follow below steps

Step -1 First download SQLyog https://sqlyog.jaleco.com/, then install it.

You will get something like enter image description here Now create a new connection for your localhost then connect to your remote database. You must remain connected to both servers together.

Step -2 Then right-click to your remote database you will get the following options. enter image description here

step-3 Now click copy database to a different host then you will get another window like enter image description here

step-4 Finally, select localhost and your database from the dropdown option. If you want structure and data check below option. Then click copy. The database will be copied. Due to my old version interface could be different but process will remain the same.

ANIK ISLAM SHOJIB
  • 3,002
  • 1
  • 27
  • 36