The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Desperate ! upgraded to MySQL 4.1 - cant downgrade !

Discussion in 'General Discussion' started by EMS, Mar 15, 2005.

  1. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Whilst setting up two servers recently I made the mistake of choosing version 4.1 instead of 4

    This has basically prevented all users from connecting to their databases. I added the line old-passwords to the my.cnf file and restarted mysql but this has made no difference. Customers cannot connect to their databases.

    So to downgrade back to v4 0 in the tweak settings option in WHM, I select mysql v4 and then run the sysup script. This results in Mysql being unable to start with the following error...

    usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

    Now, I've searched this forum for answers to the above error and tried a number of possible fixes - none have worked.

    I'm in a really sticky situation here - 4.1 wont allow them to connect to their databases and 4.0.x doesnt work at all !

    Any urgent assistance you can give would be very greatly appreciated !
     
  2. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Update...

    050315 10:45:51 mysqld started
    050315 10:45:51 Warning: Asked for 196608 thread stack, but got 126976
    050315 10:45:51 InnoDB: Started
    050315 10:45:51 /usr/sbin/mysqld: Can't open file: 'host.MYI'. (errno: 142)
    050315 10:45:51 Fatal error: Can't open privilege tables: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
    050315 10:45:51 Aborting

    Any ideas ?
     
  3. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Update...

    When I reset the MySQL server password it creates a PID in /var/lib/mysql as "server.pid" but it has not created it as "server.hostname.pid"

    The reason I notice this is if i try and start MySQL from the command line it says...

    No mysqld pid file found. Looked for /var/lib/mysql/server20.mydomain.com.pid.

    If I rename the PID file to this - and attempt to restart mysql it simply ends the process indicated by the process number in the PID


    If I go back to whm and change mysql to 4.1 - rerun sysup - it starts 4.1 fine.
     
  4. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Had this probelm also.

    Go it going after reading http://dev.mysql.com/doc/mysql/en/problems-with-character-sets.html

    Run myisamchk -dvv host.MYI and it should tell you the character set that is missing then try this: See the line:

    I am fairly sure this is what I had to do. Hope it helps.
     
  5. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    thanks for your help - i think I'm getting somewhere...

    root@server [/var/lib/mysql/mysql]# myisamchk -dvv host.MYI

    myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)

    myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
    myisamchk: error: 142 when opening MyISAM-table 'host.MYI'

    So this charset #83 is defined in the table but doesnt exist ?

    How would I get this ?
     
  6. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    /usr/share/mysql/charsets/Index

    try adding:

    cp1251 83

    you may also need

    cp1251 33

    Don't ask me if these are strictly correct but it seems to work okay for us.
     
  7. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Great !!

    Thank you - it worked !!

    I'm very pleased and very grateful for your help.
     
  8. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    No problem, I know how frustrating this sort of thing can be.
     
  9. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Update...

    Seems to be ok for most things however, I have a billing database and I'm getting the following error..

    Session Replace: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)


    Error log shows this...

    050315 14:41:37 /usr/sbin/mysqld: Can't open file: 'sessions.MYI'. (errno: 142)

    Any ideas ?
     
  10. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    try myisamchk -dvv on this table too, see if another character set is missing
     
  11. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Yeah, apologies, I should have known that. Looks like its after charset 47 now.

    I wonder if there is a way of replaceing the whole charset directory with a full set for version 4.0x
     
  12. protocol

    protocol Well-Known Member
    PartnerNOC

    Joined:
    Apr 13, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    45 in not in any of our 4.0X ones so you probably want to see what is missing from a 4.1 one
     
  13. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    That database was originally created with 4.0 - its a domain I moved across from another box. Adding 47 to the index file worked.

    This is still very much a useable option and I'm very happy. I'll simply add more if they arrive. There are some tables in a couple of databases that have been created in v4.1 and they just need fixing so in the end very little harm done - which is always a bonus !
     
  14. BubbaGum

    BubbaGum Active Member

    Joined:
    Nov 10, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Western US
    howdy,

    I'm wondering if anyone has has found a way to downgrade from 4.1 to 4.0. basically it delects the mysql.sock completely from the system totally. I've seen other threads but they assume the socket file exists somewhere on the system. Cpenal seems to delete the mysql.sock file completely during the downgrade. I hope someone can tell me how to fix the downgrade and/or get a copy of mysql.sock back on the box after the downgrade.

    thanks in advance
     
  15. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    You can always reinstall MySQL from the RPMs at dev.mysql.com and the socket should be there. to get the socket linked in /tmp and /var/tmp, you need to restart the chkservd service and it will do this automatically.

    As for 4.1 having passwords issues, all you really have to do for users not being able to authenticate is reset their passwords manually through phpMyAdmin or command line. If it's alot of users, it's not worth that, though, but if only a small amount, it's only a few minutes work.
     
  16. BubbaGum

    BubbaGum Active Member

    Joined:
    Nov 10, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Western US
    well I think this is a bug now. I tried installing RPMs from teh list in cpanel fer mySQL which installs a 3.x version, then updated to 4.0 using cpanel and it blew out mysql.sock again. I tried manually installing the rpms, but if you run tweak settings in cpanel and then run the update, she blows out mysql.sock again. techsupport from cpanel just replied back so we'll see what they say. hopefully a fix or a solution can be found now

    thanks fer yer help
     
  17. BubbaGum

    BubbaGum Active Member

    Joined:
    Nov 10, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Western US
    Howdy,

    for those looking for a solution, cpanel techs helped me with this. If you have upgraded to mySQL 4.1.x and then wish to downgrade to 4.0.x and the mysql.sock file disappears totaly and mysql will not start and nothing else seems to work listed inthe forums (Ilooked at the them all with no luck), here's the jist of the solution that worked for our downgrade problems:

    If you get this error when starting MySQL:

    050309 5:17:04 /usr/sbin/mysqld: Can't open file: 'host.MYI'. (errno: 142)
    050309 5:17:04 Fatal error: Can't open privilege tables: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)

    Do this:
    myisamchk -dvv /var/lib/mysql/mysql/host.MYI

    that should have a line like this:

    myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file

    edit /usr/share/mysql/charsets/Index and add the missing charset.

    It should look something like this when you're done:

    # tail -n 1 /usr/share/mysql/charsets/Index
    latin5_x 83
    #

    Then create the new charset's charset file:

    cp /usr/share/mysql/charsets/latin5.conf /usr/share/mysql/charsets/latin5_x.conf

    Then restart MySQl and the error should be gone and the mysql.sock files and links should appear again

    ME
     
  18. MadStu

    MadStu Active Member

    Joined:
    May 17, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi All,
    I've recently had the same problem....

    After upgrading to 4.1, then downgrading to 4.0 again.

    I searched for hours and hours until I stumbled across this topic, but I didn't follow these instructions...

    I had an email from a friend, just before I was about to follow these instructions, and he told me to change my MySQL root password from within WHM.


    I did that, and then MySQL started working again!

    Hope this helps somebody, lol.

    Stu :D
     
  19. BubbaGum

    BubbaGum Active Member

    Joined:
    Nov 10, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Western US
    howdy,

    however, the reset option was already covered in other threads and didnt work fer folks like me. I just ran into it again on another server that would not work by changing the password and had to look up these instructions again. Obviously ya want to try the password option first as it's easier.

    however, I also found that you cannot transfer mySQL databases at all from one server to another (like if the server is rebuilt) after this has all transpired. so it's an account killing mistake to upgrade to 4.1.x and then back down... atleast the two times I've seen it.
     
  20. SupermanInNY

    SupermanInNY Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    255
    Likes Received:
    0
    Trophy Points:
    16

    Worked on my server.. I spent about 4 hours not sleeping because of that.

    Thanks for this insight!!

    -Alon.
     
Loading...

Share This Page