LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2007, 10:55 AM   #1
diggodob
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
MySQL help...


Here is what I need done. I need to back up all my Databases with my webhosting company first. I think PHPMyAdmin I might be able to do it with that because I do not have root access to the MySql servers. Second after I back up and save these databases I need to copy them to a CD and have the Databases renamed to what I want the i.e. Database001, Database002, etc. The first problem is hat some of these databases have multiple users with tables from other programs. I need to "weed out" these various user tables into seperate databases and eventually put them in their OWN respective database. I did it this way originally because my hosting company only allowed 5 databases but I had 15 programs requiring MySQL.

Second, I need to Create a MYSql box at my house and import these 5 databases, into their 15 new databases so all the programs have their OWN database. I have NO CLUE on how to create the databases and thn import program specific database tables into those DBs.

Finally, on a few of those DBs the programs used an OLDER version on MySql (3.23) and I want to install the newest version of MySql. So how will these DB tables import into the new MySql... does anyone foresee any problems? They are VbBulletin DB's (The Site example is http://www.100spot.com/forums)


Any help to get started and the correct commands would be greatly appreciated. Whoever knows this stuff must be a MYSql Genius!

Thanks in advance!
 
Old 07-31-2007, 01:30 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
The "mysqldump" utility creates a backup as a file of SQL commands that you can execute to recreate the structure and data of your databases:

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

Obviously, once you have such a file you can copy parts of it to another file to make up a SQL script that recreates just specific tables (for example).

Since mysqldump is just a command-line utility you can use it in shell scripts in conjunction with any other utility to do things like batch downloads and renames of the backups that are created. If you haven't worked with shell scripts, it takes about an hour to learn with the tutorial here:

http://www.linuxcommand.org/
 
Old 07-31-2007, 02:36 PM   #3
diggodob
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hob
The "mysqldump" utility creates a backup as a file of SQL commands that you can execute to recreate the structure and data of your databases:

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

Obviously, once you have such a file you can copy parts of it to another file to make up a SQL script that recreates just specific tables (for example).

Since mysqldump is just a command-line utility you can use it in shell scripts in conjunction with any other utility to do things like batch downloads and renames of the backups that are created. If you haven't worked with shell scripts, it takes about an hour to learn with the tutorial here:

http://www.linuxcommand.org/
Great, I will start looking into thsi stuff. Much appreciated my friend.
 
Old 07-31-2007, 05:33 PM   #4
diggodob
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hob
The "mysqldump" utility creates a backup as a file of SQL commands that you can execute to recreate the structure and data of your databases:

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

Obviously, once you have such a file you can copy parts of it to another file to make up a SQL script that recreates just specific tables (for example).

Since mysqldump is just a command-line utility you can use it in shell scripts in conjunction with any other utility to do things like batch downloads and renames of the backups that are created. If you haven't worked with shell scripts, it takes about an hour to learn with the tutorial here:

http://www.linuxcommand.org/
Problem here I foresee is not having terminl access. The DBs are created via a web interface on a shared host therefore not allowing me to do anything via terminal, shell, or root. In a sense it is a "virtual" or "shared" server.
 
Old 07-31-2007, 07:10 PM   #5
diggodob
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
PHPMyAdmin has done the trick... as far as the backing up part. The Restoring part on a new MySQL server will be the task I have to tackle next.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 11:46 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration