[MY SQL]Data base placement
Posted by: Sporedd (---.dsl.alice.nl)
Date: August 15, 2008 10:32PM

hello people,

i am working on a project @ work and want to take it home.

i am using MYSQL. my question is:

Were does wamp server put the SQL database so i can copy it.

thanks in front

Greetz



Edited 1 time(s). Last edit at 08/15/2008 11:22PM by Sporedd.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: yfastud (Moderator)
Date: August 15, 2008 11:20PM


Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Sporedd (---.dsl.alice.nl)
Date: August 15, 2008 11:23PM

i mean my sql >.< sorry for the confusion



Edited 1 time(s). Last edit at 08/15/2008 11:23PM by Sporedd.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: yfastud (Moderator)
Date: August 15, 2008 11:35PM

At work, use phpmyadmin to export db, then import at home

If you don't have phpmyadmin at work, use mysql consol to backup your db then

However, if your db is MyISAM storage engine, you can copy and paste your db folder, check here for the idea

[guides.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 08/15/2008 11:36PM by yfastud.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Sporedd (---.dsl.alice.nl)
Date: August 16, 2008 12:14PM

thats for the fast response smiling smiley

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 16, 2008 03:52PM

You can also copy the whole \mysql\mysqlx.y.z\data directory. This way you make a copy off all databases on the server, no matter if the tables are MyISAM, INNOdb or anything else.

To restore, just copy the directory in same place

Remember to shut down the mysql server before doing both backup and restore (or at least make sure nobody else is working on it at that time).

See [dev.mysql.com] for more information.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: August 16, 2008 04:03PM

this is not true Mchl. INNODB cannot be done this way. its way too unreliable

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 16, 2008 04:13PM

I do it every second week.
Please explain why it's unreliable, because it worries me.

Why mysql docs list it as a valid backup method?

"The backup consists of exact copies of database directories and files. Typically this is a copy of all or part of the MySQL data directory. Data from MEMORY tables cannot be backed up this way because their contents are not stored on disk. "



Edited 1 time(s). Last edit at 08/16/2008 04:16PM by Mchl.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: August 16, 2008 05:09PM

Maybe it works for you cos your not using INNODB to full potentiant. but wen u are u cannot jsut move them arounf like this..

they need to be exported

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 16, 2008 05:15PM

IMHO if I shut down server properly before doing backup (making sure no locks are present and no transactions are pending), nothing wrong should happen.

I'll take your warning into consideration.
Fortunately, this isn't the only way I'm doing backups, and hopefully I'll never have to use backups for anything more than updating my local database.

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: yfastud (Moderator)
Date: August 16, 2008 11:17PM

While MyISAM is table locking, innodb is row locking, so when you copy and paste innodb db folder from 1 computer to another, the index for the db rows might be different and you can see the db table there but can NOT access any row no more. You might not see that bad result because it seems you backup and restore in the same computer, so try to copy and paste to different computer and experience yourself ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: [MY SQL]Data base placement
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: August 17, 2008 10:51AM

I do transfer the db this way between a production server and my development machine. No problems so far.

Options: ReplyQuote


Sorry, only registered users may post in this forum.