Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

mySql import syntax needed.

Posted on 2006-11-07
3
Medium Priority
?
343 Views
Last Modified: 2012-08-13
I have a dump file created with:

mysqldump --allow-keywords --opt -uroot -p<mypassword> --all-databases > everything_mysql.sql

Is it possible to list what databases are in the dump file and import just some of them to a new server, or do I have to import everything that's in the dump file to the new server? if it's possible to import just some of the databases in the dump file... what is the syntax? and also what is the syntax if I can only import everything?
And if the export was done in MySQL 4.1 is there any problem importing it into version 5?
The MySQL which the dump file is taken from is from Windows XP machine, will there be any problem importing the dump file into linux MySQL?
0
Comment
Question by:nediam1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 800 total points
ID: 17887710
Hi,

For the compatibility there should not be a problem. (forward and also cross OS)

shell> mysqldump [options] db_name [tables]
shell> mysqldump [options] --databases db_name1 [db_name2 db_name3...]
shell> mysqldump [options] --all-databases

http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17887720
if you use --databases then you can specify which to download
0
 

Author Comment

by:nediam1234
ID: 17887776
Thank you for your answer...  Got everything now :)
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question