How can I export MySQL database manually - without phpmyadmin

39,180

I have always used mysqldump -u username -p databasename > backup.sql with no issues.

Share:
39,180

Related videos on Youtube

Achu
Author by

Achu

Updated on September 18, 2022

Comments

  • Achu
    Achu over 1 year

    My phpmyadmin doesn't work. I see only white blank page when I open it (it has some issue),

    However, I'd like to export my project database manually to another computer.

    I saw all my databases inside /var/lib/mysql and when i run

    mysqldump -u username -p databasename > backup.sql
    

    using mysqldump for backing-up, it freezes up and does nothing

    Is there any another way by which I can export my database?

    • Nishan29
      Nishan29 almost 13 years
      I just wanted to say use mysqldump
    • SpamapS
      SpamapS over 12 years
      Achu, have you tried looking at mysql -u username -p -e 'show processlist' ? It may offer a clue as to what mysqldump is waiting for. Could be a table lock.
    • Hailwood
      Hailwood about 12 years
      This question is better suited for stackoverflow.com
    • Rinzwind
      Rinzwind almost 4 years
      "using mysqldump for backing-up, it freezes up and does nothing" Open a 2nd terminal. cd to the dir you started the command and do ls -l Yoiu will see the file and it will be growing. ALSO: make sure you do this in a dir you own. Not in /var/lib/
  • shasi kanth
    shasi kanth over 10 years
    This can be done from $: /var/www
  • Mohammed Joraid
    Mohammed Joraid almost 7 years
    No password for the db user?
  • Marc Vanhoomissen
    Marc Vanhoomissen over 2 years
    From the manual : --no-tablespaces, -y This option suppresses all CREATE LOGFILE GROUP and CREATE TABLESPACE statements in the output of mysqldump. Why would this option prevent freeezing?