antum
asked on
Using old data dir in new installation
Hi
I had some trouble getting mysql re-installed, and when I did it has started to use a new data directory that contains the default databases. Now I have my old databases trapped in a folder, I tried to overwrite the new folder with the old folder but then the mysql service wouldn't start.
So is there some way for me to get the old databases into my new installation?
I am running Windows XP Pro 2003 all the latest updates, MySQL Server 4.1 (I think I used to have 4.0.25) is this going to be a problem?
Thanks for your help,
:Ant
I had some trouble getting mysql re-installed, and when I did it has started to use a new data directory that contains the default databases. Now I have my old databases trapped in a folder, I tried to overwrite the new folder with the old folder but then the mysql service wouldn't start.
So is there some way for me to get the old databases into my new installation?
I am running Windows XP Pro 2003 all the latest updates, MySQL Server 4.1 (I think I used to have 4.0.25) is this going to be a problem?
Thanks for your help,
:Ant
It seems likely that the reason your server doesn't start is because of the password hashing issue or some other incompatibility between the versions. Can you check the server error log (should be found at [mysql_home]/data/[host_na me].err, where [mysql_home] is the MySQL installation directory and [host_name] is the machine name.
ASKER
Can I generate a mysql dump from a data directory or does it have to be a running server?
Thanks,
:Ant
I had a look in the log file but there is no mention of the error, i think i might have re-installed after the first time I received that error
Thanks,
:Ant
I had a look in the log file but there is no mention of the error, i think i might have re-installed after the first time I received that error
mysqldump has to be executed against a running server.
So, before we go any further, do you have a working installation of MySQL right now? Just without the data from the old installation? Let's check that before we make any changes.
So, before we go any further, do you have a working installation of MySQL right now? Just without the data from the old installation? Let's check that before we make any changes.
ASKER
yeah, i have it working as a fresh install.. the old data is in a backup directory it is the entire contents of the mysql/data dir.
I managed to just copy all the folders across to the new mysql/data dir and it looks as if they are all there (mysql -u root -p then SHOW DATABASES;)
But I can't connect to the mysql server using php.. I still get a "Can't connect to MySQL server on 'localhost' (10013)" Even though I can from the command line.
Any help is appreciated,
Thanks,
:Ant
I managed to just copy all the folders across to the new mysql/data dir and it looks as if they are all there (mysql -u root -p then SHOW DATABASES;)
But I can't connect to the mysql server using php.. I still get a "Can't connect to MySQL server on 'localhost' (10013)" Even though I can from the command line.
Any help is appreciated,
Thanks,
:Ant
OK, the php probably relies on a specific account being created that doesn't yest exist in the new installation, or it could be an issue related to the password hashing algorithm:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
When you are connected on the command-line using the root account, can you verify whether the php-required account exists?
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
When you are connected on the command-line using the root account, can you verify whether the php-required account exists?
ASKER
I'm testing the php with the root account so I know it exists.. but yes it could be the hashing thing.
Is it safe to set the root password to the old style?
Note: this is just for my development tests...
thanks,
:Ant
Is it safe to set the root password to the old style?
Note: this is just for my development tests...
thanks,
:Ant
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Ok so i turned off the firewall and all is happy.!!
grrr...
so how do I have the firewall going and my dev. environment?
Thanks for your help!!
Ok so i turned off the firewall and all is happy.!!
grrr...
so how do I have the firewall going and my dev. environment?
Thanks for your help!!
You have to build an exception for it. I can't provide step-by-step instructions on how to do that, but I bet somebody in the WinXP topic area can.
ASKER
Thanks for your help!
And thanks for the points!
One big change between 4.0 and 4.1 is the password hashing algorithm changed, which impacts the mysql account tables.
Is loading the data from a mysqldump backup not an option? It sounds like maybe the 4.0 installation is gone now.