LinuxQuestions.org
Review your favorite Linux distribution.
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 02-03-2005, 01:24 AM   #1
jackster
LQ Newbie
 
Registered: Jan 2005
Location: Pretoria, South-Africa
Distribution: Mandrake 10
Posts: 19

Rep: Reputation: 0
Mysql - Copying database files.


I'm a mysql newbie. Here's the situation... We had a bundled version of mySql installed on the server and i didn't like it. So i installed 4.1.9-log on our server and all is good. What i want to know is, can i copy the old database files e.g. /somewhere/oldmysql/var/database_xx_directory to my new datadirectory? I've done this and i can view the database in phpmyadmin, but now phpnuke does like me any more. Should i rather have done a mysqldump than just copy the dir?

Tx
 
Old 02-03-2005, 01:52 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Yeah, a mysqldump databasename > whatever.sql and then a mysqldump databasename < whatever.sql would have been a better way to do it. As long as you've got the old one still, you should be able to get it working that route (drop the new database to re-create with the steps above).

Cool
 
Old 02-03-2005, 02:03 AM   #3
jackster
LQ Newbie
 
Registered: Jan 2005
Location: Pretoria, South-Africa
Distribution: Mandrake 10
Posts: 19

Original Poster
Rep: Reputation: 0
That's all good, but the problem is that the dump should have been done before the installation of mysql 4.1.9. The problem is that they have different data dir. So when i execute that command you gave, it says "mysqldump: Got error: 1049: Unknown database 'Willie' when selecting the database".

??
 
  


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
Table copying in MySQL prabhatsoni General 4 10-26-2004 05:43 PM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 02:43 PM
copying MySQL database linuxprogrammer Linux - Newbie 1 07-23-2004 09:53 PM
MYSQL help - mysql database missing eloviyandhi Linux - Software 1 03-20-2004 09:20 PM
Copying mysql database to another comp parsek Linux - Software 1 11-15-2003 07:34 PM

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

All times are GMT -5. The time now is 10:15 AM.

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