Problem w/copying database created in MySQL to other folder

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem w/copying database created in MySQL to other folder

Postby newbie2244 » 06. March 2009 21:05

Greetings-

I created a database with all privileges to anyone on localhost. I then tried to copy the database to another directory from phpMyAdmin(pma). The pma tells me that it has been copied to the destination directory/folder. But when I open that destination folder, there is no database. Instead the database has been copied to MySQL. How do I remedy this? Searched the topic, but there were no matches. Any suggestions would be much appreciated. Thanks.
newbie2244
 
Posts: 49
Joined: 20. February 2009 22:39

Re: Problem w/copying database created in MySQL to other folder

Postby Wiedmann » 06. March 2009 21:13

I then tried to copy the database to another directory from phpMyAdmin(pma).

You have tried what?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Problem w/copying database created in MySQL to other folder

Postby newbie2244 » 06. March 2009 21:27

Actually, I meant to write from within MySQL accessed through phpMyAdmin. I apologize for my lack of clarity . . . I understand why the database & tables stay within my SQL, WHat I don't understand is why when I try to copy the database and/or the table in it to another location, from within "Operations" , I get a message that the database or the table has been successfully copied to the destination when in fact its only copied to the MySQL data folder. I specify the destination directory by the full path pointing to it, for ex: C:\xampp\htdocs\xampp\SQLite\datafile_name.
newbie2244
 
Posts: 49
Joined: 20. February 2009 22:39

Re: Problem w/copying database created in MySQL to other folder

Postby Izzy » 07. March 2009 12:01

phpMyAdmin is ignoring the location you type in and is copying the original db to the new db name you gave it which is doing it's job as it should or MySQL would not know where to look for your new databases other than in the mysql\data folder.

The datadir location is set in the mysql\bin\my.cnf file and this is where databases are stored and is where phpMyAdmin will also save databases during a copy and where MySQL looks for the database.

If you want to copy a database to another location then you have to change the datadir location in the my.cnf file and then all databases will be stored and accessed form that location - so you will not be able to access any databases that were in the old location unless you copy all databases to the new location - can you follow that?

You would normally create a new datadir location then copy or move all the database named folders from the mysql\data folder to the new location.
Last edited by Izzy on 12. March 2009 07:42, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Problem w/copying database created in MySQL to other folder

Postby newbie2244 » 10. March 2009 00:03

THANKS Izzy. I was exploring the functionality of xampp and then under the influence of very little sleep I started thinking about workspaces removed from the apps. (I also have eclipse (java) on my system amd the workspace can be anywhere.

One more question, what do the red stars mean - are they warnings? All my posts are red-starred. Is my tone inappropriate?
I sent Wiedmann a private message with the same question, a few days ago but no response.
Thanks again.
newbie2244
 
Posts: 49
Joined: 20. February 2009 22:39

Re: Problem w/copying database created in MySQL to other folder

Postby Izzy » 10. March 2009 00:37

newbie2244 wrote:One more question, what do the red stars mean - are they warnings? All my posts are red-starred. Is my tone inappropriate?
I doubt it for a moment.

If you are using the default forum style prosilver, which btw can be changed in your User Control Panel, then the red star on the topic icon indicates that you have posted in that particular topic.

In the alternative forum style subsilver, the red star post indicator is replaced by a black dot on the topic icon.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 43 guests