Page 1 of 1

Problem w/copying database created in MySQL to other folder

PostPosted: 06. March 2009 21:05
by newbie2244
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.

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

PostPosted: 06. March 2009 21:13
by Wiedmann
I then tried to copy the database to another directory from phpMyAdmin(pma).

You have tried what?

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

PostPosted: 06. March 2009 21:27
by newbie2244
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.

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

PostPosted: 07. March 2009 12:01
by Izzy
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.

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

PostPosted: 10. March 2009 00:03
by newbie2244
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.

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

PostPosted: 10. March 2009 00:37
by Izzy
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.