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.

mysqld

Discussion in 'General Discussion' started by poops, May 6, 2006.

  1. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    when i try to run following command



    /scripts/restartsrv mysql



    following error is come



    connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    mysql has failed, please contact the sysadmin (result was "mysql has failed").


    I dig out many many topics but problem is still there!!!

    please please any one is there who can really help me.....
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Try the below steps :-
    1) Set the passwd for mysql in /root/.my.cnf
    2) killall mysqld
    3) Restart mysqld with the --skip-grant-tables option as below :-
    /usr/bin/safe_mysqld --skip-grant-tables &
    4) Connect to Mysql :- Just type 'mysql' at the prompt without those quotes.
    5) Update passwd for root user with the below command :-
    > update user set Password = Password('pass') where User ='root';
    6) exit

    Try connecting to mysql again.

    Also refer this :- http://forums.cpanel.net/showthread.php?t=48890
     
  3. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    thank so much but when i start the mysql
    and run command
    -
    -
    -
    update user set Password = Password('pass') where User ='root';


    ERROR 1046 (3D000): No database selected


    and when i used this conmmand
    mysql>use mysql

    and then

    update user set Password = Password('pass') where User ='root';

    Query OK, 2 rows affected, 2 warnings (0.00 sec)
    Rows matched: 2 Changed: 2 Warnings: 2

    now is it okay or not bcoz when i restart the mysql by using command

    service mysql restart or start
    and then type
    #mysql -u root -p
    enter password:here i give pass
    Thanx THANX THANX i can't say any word beacause i've not any word to explain your greatness......
    I try hard but got so far
    but in the end it is done by ur help

    thanx once again
     
  4. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    sir,
    problem is still

    when i restart the mysql


    then i try


    mysql -u root -p
    Enter password: pass(whcih i've set)
    then following error comes


    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    what to next i don't know


    No solution?

    please help me
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Check the file /root/.my.cnf and make it look like this :-
    [client]
    user=root
    pass=somepassword
    Change the password to the root mysql password you have set. Save the file and check.

    If the above things doesn't help, try upgrading Mysql and downgrade back to the old version from WHM. Login to WHM >> Server Configuration >> Tweak Settings >> Click radio button for MySQL 4.1 >> Save.
     
  6. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    sir in my whm there r only one radio button and it is by default selected
    and this is the another check box which is already selected

    Use old style (4.0) passwords with mySQL 4.1 (required if you have problems with php apps authenticating)



    what to do next sir


    tell me some different methods
     
  7. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Select the radio button for
    "Bundle:: DBD::mysql. Updating from mysql 4.0 to mysql 4.1 is not automaticlly reversable"
    and select the check box
    "Use old style (4.0) passwords with mySQL 4.1 (required if you have problems with php apps authenticating)
    and
    Click Save.

    If the above things are already done then try removing Mysql and installing again with :-
    /scripts/mysqlup --force
     
    #7 madaboutlinux, May 7, 2006
    Last edited: May 7, 2006
  8. capoti

    capoti Active Member

    Joined:
    Mar 25, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    why begging for an answer. you can hire a sys admin to fix whatever problem on your server. there are many of'em out there, man.
     
  9. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    This option does not always add the old-passwords line into the /etc/'my.cnf

    I would suggest to verify that the old-passwords option is actually in the /etc/my.cnf and if not add it in the [mysqld] section and restart mysqld
     
  10. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    I begging just 4 learning......Now i've learnt.
    so never give your cheaper and rubish suggessions.....
    I you don't know how to resolv the problem...
    thanx:D
     
  11. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1

    thanx thanx Mr Shekhar,
    You help me from 1st day....I m realy thank full to you..
    now i've downgraded mysql to 4.1 and it is working thanx once again...
     
  12. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    to downgrade i've used these configurations and it is goning success full...
    -
    -
    -
    -

    If you want a quick and dirty way and you don't have any databases, then you could do the following if you're using an rpm based linux:

    rpm -qa | grep -i mysql-

    Then use rpm -e on each match for MySQL v5.

    Then remove /var/lib/mysql:

    rm -Rfv /var/lib/mysql

    Then edit /var/cpanel/cpanel.config and set:

    mysql-version=4.1

    Make sure that the skip file isn't there:

    rm -fv /etc/mysqlupdisable

    Then install MySQL:

    /scripts/mysqlup --force

    Then update the perl module:

    /scripts/perlinstaller --force Bundle::DBD::mysql

    Then recompile apache/php.

    Of course, if you do have MySQL d/b's then you'll have to consult further on whether they can be downgraded and miss out the removal of the mysql dir.

    Once done:

    /scripts/upcp --force






    for recompiling apache/php method is:


    $ cd /home/cpapachebuild/buildapache/php-5.0.4
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --enable-memory-limit --enable-magic-quotes --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --with-zlib --with-ldap
    $ make clean
    $ make
    $ make install
    $ /usr/sbin/httpd graceful
     
  13. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Nice to see, your problem is resolved.

    Also to recompile apache/php, you can do that from shell.
    Execute /scripts/easyapache. Select 7th option and select the modules you wish to have and Save.
    or
    You can do the same from WHM >> "Update Apache" option.
     
Loading...

Share This Page