View previous topic :: View next topic |
Author |
Message |
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Fri Dec 08, 2006 4:15 Post subject: Need some advice about MySQL Server |
|
|
I am about to migrate from MySQL 4.1 to 5.0. Or should I just go to 5,1 beta?
Is there anything I need to be aware of or worry about?
Also, is there any tricks to migrate my old data?
Can I just copy the database from the 4.1 Data Directory to the 5.0 Data Directory?
I know this is not about NWNX4, but I trust you guys' advice. _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Fri Dec 08, 2006 4:32 Post subject: |
|
|
I've not worked with 5.1 so I can't speak to that.
But to move your data, copying over the directories won't work. Instead: run this command:
mysql_dump -u username -p --all-databases > database.sql
And to restore:
mysql -u username -p < database.sql
At least that's the quickest way I know of -- others may have better suggestions. You may need to recreate user accounts, I can't recall offhand... _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
Grumalg
Joined: 04 Nov 2005 Posts: 70
|
Posted: Fri Dec 08, 2006 4:41 Post subject: |
|
|
Personally I'm staying away for any MySQL beta's, as there are enough things to worry about without risking DB engine problems.
As far as migration, one simple way is to backup the current DB with the MySQL Admin app. Since the backup takes the form of script commands that include table and index creation and inserting the existing data, restoreing such a backup is in fact creating the DB contents from scratch in the new engine.
You can freely examine such .sql backup files in a text editor and see what they do. I have used this to do things like manually create a table in MySQL admin, then back it up and extract the SQL table creation code into NWScript for editing to handle NWScript creation of DB stuff...
--- Grumalg --- |
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Fri Dec 08, 2006 4:46 Post subject: |
|
|
Grumalg wrote: | Personally I'm staying away for any MySQL beta's, as there are enough things to worry about without risking DB engine problems.
--- Grumalg --- |
Hehe! That was kinda my thoughts too. I just needed someone else to confirm it to me. Thanks Grumalg. _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
|