Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Topics

Recent Status Updates

View All Updates

- - - - -

MySQL dump all databases?

mysql setup

  • Please log in to reply
5 replies to this topic

#1 Guest_Wanch_*

Guest_Wanch_*
  • Guest

Posted 06 November 2008 - 06:34 AM

Is it possible to dump all MySQL databases into a SQL file so I can move the databases to a new MySQL server? I've been doing it 1x1 but realized there are some databases that I may miss (like the horde database).
  • 0

#2 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 12 November 2008 - 05:00 AM

This is possible, I had to look in the manual and found it here:

MySQL :: MySQL 5.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program

You can dump all databases by doing:

# mysqldump [options] --all-databases

An example would be:
# mysqldump -u root -p --all-databases > all_dbs.sql

If you just want to dump several databases into one file:

# mysqldump [options] --databases db_name1 [db_name2 db_name3...]

An example would be:

# mysqldump -u SomeUser -p --databases mydb1 mydb2 mydb3 > myDbs.sql

  • 0

#3 Prog

Prog

    CC Resident

  • Just Joined
  • PipPipPipPip
  • 95 posts

Posted 14 November 2008 - 09:37 AM

There is also a way to iterate through all tables but I cannot remember it.
  • 0

#4 Guest_Wanch_*

Guest_Wanch_*
  • Guest

Posted 17 November 2008 - 05:45 AM

Jordan's suggestion works. Thanks for your help! :D
  • 0

#5 tecktalk

tecktalk

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 155 posts

Posted 28 November 2008 - 06:54 AM

yeah!.. he is the god of this forum and is very talented person.. :D i love him just anyways.. Hey Jordon.. I would too like to know something but about the installation of programs in linux as I am just new in linux as I was using Windows previously and just confused about everywhere.. I am using ubuntu..
Can you please tell me where I can get main programs like media players. for linux the basic things??

____________________
corporate awards thermaclear
  • 0

#6 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 28 November 2008 - 10:18 AM

I would use Synaptic for that. Ubuntu has it labeled something like an Add/Remove programs. It will download the necessary files from the internet.
  • 0





Also tagged with one or more of these keywords: mysql, setup

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download