Hi i know in windows for exporting large sql files to phpmyadmin i run following command:

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

in location (C:\xampp\mysql\bin)

i have another virtual Kali Linux system in which Xampp directory is


but in mysql directory there is no bin folder , what's the accurate command and executable directory to run export sql command in kali linux .

note:(This question is related with magento 2 because i want to export its big sql file to local server so please if you can't answer it , dont mark it as irrelevant , i am so thankful to you :) ... )

1 Answer 1


It's so simple. You can export the database to any directory which you want.

To do so:

  • Open terminal (CTRL + ALT + T) and put the following command first:

cd /opt/lampp

  • Now run the mysqldump command from here:

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

This will export the database to /opt/lampp directory. You can change the path /opt/lampp to any other path.

  • i am getting this error : when trying to use this command : mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Commented Jan 16, 2018 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.