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.

MySQL Install Errors

Discussion in 'General Discussion' started by amard, Jun 14, 2005.

  1. amard

    amard Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Herts, UK
    Hi,

    One of our servers had an issue after CPanel updated the MySQL version, resulting in it not starting no matter what.

    We've therefore tried a re-install several times without success, both from source code and by running the "/scripts/mysqlup --force" command. Each time we fail, we delete all of the files before trying again.

    When using CPanel's script, the following errors occur:
    Code:
    Giving mysqld a couple of seconds to exit nicely
       1:MySQL-server           ########################################### [100%]
    050614 13:02:29 [Warning] Asked for 196608 thread stack, but got 126976
    050614 13:02:29 [Warning] Asked for 196608 thread stack, but got 126976
    
    ^ I think that this error is causing the errors which follow, although there's not much info on the errors when Googling it.

    Code:
    Starting MySQL                                             [  OK  ]
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)' mysql has failed
    
    ^ The MySQL process does successfully start|stop|restart now, although when connecting to mysql or mysqladmin, it shows the same error as during installation.

    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Got a failure from command:
    /usr/bin/mysql --no-defaults --force --user=root --host=localhost --password=******** --database=mysql
    Please check the above output and try again.
    
    ^ I think that this one is a direct result of the 2 errors above, and should be solved when the other errors are fixed.

    Does anyone have any insight into what this may be? The only thing we can think of after trying everything we could think of, is that there's a bug in version of MySQL 4.1.11 that CentOS have in their RPM.

    Thanks for any help

    :)
     
    #1 amard, Jun 14, 2005
    Last edited: Jun 14, 2005
  2. amard

    amard Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Herts, UK
    The first error was solved by adding the following line to /etc/my.cnf

    Code:
    set-variable = thread_stack=126976
    1 down, 2 to go

    :)
     
  3. amard

    amard Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Herts, UK
    Looks like we've solved it in the end.

    Second and third errors dissappeared after:

    1. Using WHM to reset the MySQL password to nothing
    2. Then using WHM to set an actual MySQL password
    3. Logging into MySQL via SSH and patching up the user tables

    Oh well, thanks anyway :cool:
     
  4. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Well.. Lucky you - you can start MySQL server, but I fail to do that at all! Get the following error (CentOS 4.0 Final)

    050614 18:39:59 mysqld started
    050614 18:39:59 InnoDB: Started
    050614 18:39:59 /usr/sbin/mysqld: Can't open file: 'host.MYI'. (errno: 142)
    050614 18:39:59 Fatal error: Can't open privilege tables: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
    050614 18:39:59 Aborting

    050614 18:39:59 InnoDB: Starting shutdown...
    050614 18:40:02 InnoDB: Shutdown completed
    050614 18:40:02 /usr/sbin/mysqld: Shutdown Complete

    050614 18:40:02 mysqld ended

    Any ideas how to fix? (that's a fresh installed WHM box).

    On one side I can try to erase mysql and do a manual install from MySQL website, but I think that then WHM will notice - "Oh, I am missing MySQL" and make an update.. :(
     
    #4 anton_latvia, Jun 14, 2005
    Last edited: Jun 14, 2005
  5. amard

    amard Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Herts, UK
    Hi,

    I would guess that your host.MYI file has the wrong permissions.

    What I would do is:
    Code:
    locate -u
    locate host.MYI
    
    This should tell you where the file is, although it's most likely in the folder /var/lib/mysql/mysql. Assuming it is, I would then use:
    Code:
    chown mysql:mysql /var/lib/mysql/mysql/host.MYI
    chmod 0660 /var/lib/mysql/mysql/host.MYI
    chown mysql:root /var/lib/mysql/mysql
    chmod 0711 /var/lib/mysql/mysql
    service mysql restart
    
    Might work, might not :)
     
  6. amard

    amard Well-Known Member

    Joined:
    Jan 18, 2003
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Herts, UK
    If there's nothing to lose by making a fresh start, another option is this:
    Code:
    rm -Rf /var/lib/mysql
    rm -Rf /usr/bin/mysql*
    rm -Rf /usr/bin/*mysql*
    rm -Rf /usr/sbin/*mysql*
    rm -Rf /usr/share/mysql
    /scripts/mysqlup --force
    
    Then go to WHM > "Mysql" > "Reset Local MySQL Root Password" and enter a secure root password.

    This will remove all data, databases and users though, so don't do it on a production server (unless you have in-depth data archives like we did).

    :)
     
    #6 amard, Jun 14, 2005
    Last edited: Jun 14, 2005
  7. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Thanks a lot!!! This solution worked for me! :)
     
  8. Jeffa

    Jeffa Member

    Joined:
    Jun 19, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Thanks!

    This also worked for me :), I had the same hosts.myi error :)

    -Jeffa
     
Loading...

Share This Page