| View previous topic :: View next topic |
| Author |
Message |
dageyra Apprentice


Joined: 22 Feb 2005 Posts: 186 Location: Terre Haute, IN
|
Posted: Mon Apr 30, 2012 2:58 am Post subject: Upgrading mysql won't start due [SOLVED] |
|
|
I am upgrading mysql from 4.1 to the latest version 5.5 I believe. Everything has gone smoothly except that after the upgrade I can't get mysql to start.
Here is a snippet from the log:
| Code: |
120429 23:10:02 [Warning] './mysql/host' had no or invalid character set, and default character set is multi-byte, so character column sizes may have changed
120429 23:10:02 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'host'; try to repair it
|
Any idea what is stopping mysql from starting? I know that mysql_upgrade is supposed to be run but it requires a valid mysql connection, which I can't get without mysql starting! So it creates a catch-22. I did try to run mysql_upgrade after the new mysql was emerged but it threw errors, which I thought were related to needed to restart the service.
Thanks for any suggestions you can provide to get past this error.
Last edited by dageyra on Thu May 10, 2012 8:02 pm; edited 1 time in total |
|
| Back to top |
|
 |
Mad Merlin Veteran

Joined: 09 May 2005 Posts: 1134
|
Posted: Tue May 01, 2012 2:37 am Post subject: |
|
|
That's a biiiiiiig version jump, you skipped over 5.0, 5.1, 5.4 and went straight to 5.5. The farther you jump here, the bigger the chances of something bad happening, I believe only 1 major version at a time is supported.
Now, assuming you did a clean shutdown of the old 4.1 install and the data on disk is actually OK, I would suggest doing a full mysqldump (--all-databases) with the old version and then importing it with the new version and then running mysql_upgrade. This is your most reliable bet and the best chance for having your data 100% correct when you restore.
Edit: If for whatever reason that's not an option, you can use the myisamchk tool directly on the tables without having the daemon started. _________________ Game! - Where the stick is mightier than the sword! |
|
| Back to top |
|
 |
dageyra Apprentice


Joined: 22 Feb 2005 Posts: 186 Location: Terre Haute, IN
|
Posted: Tue May 01, 2012 3:35 am Post subject: |
|
|
| Mad Merlin wrote: | That's a biiiiiiig version jump, you skipped over 5.0, 5.1, 5.4 and went straight to 5.5. The farther you jump here, the bigger the chances of something bad happening, I believe only 1 major version at a time is supported.
Now, assuming you did a clean shutdown of the old 4.1 install and the data on disk is actually OK, I would suggest doing a full mysqldump (--all-databases) with the old version and then importing it with the new version and then running mysql_upgrade. This is your most reliable bet and the best chance for having your data 100% correct when you restore.
Edit: If for whatever reason that's not an option, you can use the myisamchk tool directly on the tables without having the daemon started. |
Thanks for the reply. Some interesting developments, the data is fine. The server performed daily backups and I did do a full dump prior to starting this. However, we have 5.5 running on another server (mail server actually, where we were testing database compatibility). Moving the data files over, everything is accessible. I actually was able to setup the users with remote access, and now all the services are functioning normally (except those that we knew were incompatible, not core services). So that tells me the data is fine and actually it makes fixing this issue on the main server as more of an exercise for me.
So you're suggesting basically what I did with the mail server, to do a clean install on the web server and then import the data accordingly? The "host" error whatever it is won't be a problem with a clean install? |
|
| Back to top |
|
 |
Mad Merlin Veteran

Joined: 09 May 2005 Posts: 1134
|
Posted: Tue May 01, 2012 9:53 pm Post subject: |
|
|
| dageyra wrote: | | Mad Merlin wrote: | That's a biiiiiiig version jump, you skipped over 5.0, 5.1, 5.4 and went straight to 5.5. The farther you jump here, the bigger the chances of something bad happening, I believe only 1 major version at a time is supported.
Now, assuming you did a clean shutdown of the old 4.1 install and the data on disk is actually OK, I would suggest doing a full mysqldump (--all-databases) with the old version and then importing it with the new version and then running mysql_upgrade. This is your most reliable bet and the best chance for having your data 100% correct when you restore.
Edit: If for whatever reason that's not an option, you can use the myisamchk tool directly on the tables without having the daemon started. |
Thanks for the reply. Some interesting developments, the data is fine. The server performed daily backups and I did do a full dump prior to starting this. However, we have 5.5 running on another server (mail server actually, where we were testing database compatibility). Moving the data files over, everything is accessible. I actually was able to setup the users with remote access, and now all the services are functioning normally (except those that we knew were incompatible, not core services). So that tells me the data is fine and actually it makes fixing this issue on the main server as more of an exercise for me.
So you're suggesting basically what I did with the mail server, to do a clean install on the web server and then import the data accordingly? The "host" error whatever it is won't be a problem with a clean install? |
Basically, yes. The data formats change over time and I would be surprised if there's any serious testing done of 5.5 reading 4.1 data files. On the other hand, the database dumps are meant to be portable, so they should work just fine for moving your data around versions. _________________ Game! - Where the stick is mightier than the sword! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|