LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-18-2010, 06:48 PM   #1
rublind
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
VPS Reinstall, Old MySQL Access


So this is more of a theoretical question (will be put into practice if this is possible).

I'm working with Plesk and a Virtual Private Server. They have the option to do a re-install (in case things get too broken or what have you). I'd like to be able to access the old database (it's called psa and would be located in /old/var/lib/mysql/psa) via the mysql command to get data from there.

Is it possible to do this? I was thinking of using a socket, but since the mysql service would be started from the new installation, would the old installation even have a socket?

I *do not* want to copy the database over to the new folder for several reasons. The first is that it's an InnoDB and I think I'd have to also copy over the ibdata stuff. More importantly, there is a fresh copy of the psa database that would be created and I DO NOT want to overwrite this.

Please let me know if anyone has any ideas.

Thank you!
 
Old 02-18-2010, 07:04 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Depends what you need, but start with pointing the mysql.conf at the old DB and extracting what you need to a flat file.
Then point stop MySQL, point the conf file at new DB and away you go.
That assumes it's a one off operation at re-install.
If you want continuous access, then mysqldump the old DB, edit the file (its just text) to have a new schema name eg old_whatever, then re-import into the new DB.
 
1 members found this post helpful.
Old 02-18-2010, 07:16 PM   #3
rublind
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Well, more than likely, I will have to generate a bash script that will execute Plesk code to re-add all the information, but that is not really a problem. Just for clarification, I would be modifying the datadir variable, correct? Additionally, this would require me to login using the information from the old installation as well, right? (I'm assuming so, since it will be referencing the older mysql users table, but just want to clarify).

Thank you!
 
  


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
RAM full after dist-upgrade, apache2, php, mysql installation on a VPS motiongrafika Linux - Server 5 01-31-2010 11:18 PM
Can I do a clean debian reinstall on a VPS walterbyrd Debian 2 01-10-2010 05:37 PM
how to upgrade mysql and php on operational VPS coffee666 Linux - Newbie 1 12-24-2007 10:29 PM
Where can I download UML VPS or Xen VPS to make a virtual private server? abefroman Linux - Software 3 12-09-2005 10:00 AM
reinstall mysql or rebuild mysql?? dsiguy Linux - Software 3 07-15-2003 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:35 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