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 admin problem

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

  1. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    when i click on the

    phpMyAdmin

    means following page

    http://my-server-ip address:2086/3rdparty/phpMyAdmin/index.php

    then there is an error

    Wrong username/password. Access denied.


    why this error?????


    how to fix it i've no idea......please help me
     
  2. zenlizard1977

    zenlizard1977 Registered

    Joined:
    Dec 29, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    any fix for this? I am getting the same thing.
     
  3. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Try /scripts/mysqlup --force
     
  4. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    same problem

    hello, i have the same exact problem and have been searching every part of the web to find a solution to no avail. i sure hope you guys can help, i would truely appreciate it as im out of ideas. im running centos 4.x with WHM 10.8.0 cPanel 10.8.2-C92 . i tried changing the update to release as well as current but get the same problems. when i click phpmyadmin i get the Wrong username/password. Access denied. when i try to restart mysql i get /usr/bin/mysqladmin: 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 tried the tip recommended here as well as others that i searched for that were back in 2003. any ideas please? also, would any be able to provide a detailed instruction (for someone new to linux) to install latest php on server. apache breaks when i try to install php5 via the apache update and i have to revert back to php4)

    when i click Change a User or Database Password i get ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    i have done both MySQL Root Password, and Reset Local MySQL Root Password in WHM. i have reset the server a million times. none of this has worked.

    i have mysql 5, which i chose in the WHM. here is the complete install i get in ssh

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h fs.fearlessservers.com password 'new-password'
    See the manual for more instructions.

    NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
    the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
    able to use the new GRANT command!

    Please report any problems with the /usr/bin/mysqlbug script!

    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at https://order.mysql.com
    Starting MySQL[ OK ]
    Preparing... ########################################### [100%]
    1:MySQL-shared ########################################### [100%]
    /usr/sbin/setfiles: read 2 specifications
    /usr/sbin/setfiles: labeling files under /
    /usr/sbin/setfiles: hash table stats: 1 elements, 1/65536 buckets used, longest chain length 1
    /usr/sbin/setfiles: Done.
    Method: Perl Expect
    Testing connection speed...(this could take a while)...Done
    Ping:9.765 Testing mirror speed and update status (cpan.belfry.net) using wget...(1970000 bytes/s)...Done
    Ping:1.508 Testing mirror speed and update status (mirror.hyperian.net) using wget...(1890000 bytes/s)...Done
    Ping:25.131 Testing mirror speed and update status (cpan.uchicago.edu) using wget...(110310 bytes/s)...Done
    Three usable mirrors located
    Three usable mirrors located
    Mirror Check passed for cpan.belfry.net (/index.html)
    commit: wrote '/usr/lib/perl5/5.8.7/CPAN/Config.pm'
    CPAN: File::HomeDir loaded ok
    CPAN: Storable loaded ok
    Going to read /home/.cpan/Metadata
    Database was generated on Thu, 11 May 2006 02:24:41 GMT
    Running install for module DBD::mysql
    Running make for C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz
    CPAN: Digest::SHA loaded ok
    CPAN: Module::Signature loaded ok
    WARNING: This key is not certified with a trusted signature!
    Primary key fingerprint: 2E66 557A B97C 19C7 91AF 8E20 328D A867 450F 89EC
    Signature for /home/.cpan/sources/authors/id/C/CA/CAPTTOFU/CHECKSUMS ok
    CPAN: Compress::Zlib loaded ok
    Checksum for /home/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz ok
    Scanning cache /home/.cpan/build for sizes
    DBD-mysql-3.0003/
    DBD-mysql-3.0003/ChangeLog
    DBD-mysql-3.0003/constants.h
    DBD-mysql-3.0003/dbdimp.c
    DBD-mysql-3.0003/dbdimp.h
    DBD-mysql-3.0003/INSTALL.html
    DBD-mysql-3.0003/lib/
    DBD-mysql-3.0003/lib/Bundle/
    DBD-mysql-3.0003/lib/Bundle/DBD/
    DBD-mysql-3.0003/lib/Bundle/DBD/mysql.pm
    DBD-mysql-3.0003/lib/DBD/
    DBD-mysql-3.0003/lib/DBD/mysql/
    DBD-mysql-3.0003/lib/DBD/mysql/GetInfo.pm
    DBD-mysql-3.0003/lib/DBD/mysql/INSTALL.pod
    DBD-mysql-3.0003/lib/DBD/mysql.pm
    DBD-mysql-3.0003/lib/Mysql/
    DBD-mysql-3.0003/lib/Mysql/Statement.pm
    DBD-mysql-3.0003/lib/Mysql.pm
    DBD-mysql-3.0003/Makefile.PL
    DBD-mysql-3.0003/Makefile.PL.embedded
    DBD-mysql-3.0003/MANIFEST
    DBD-mysql-3.0003/MANIFEST.SKIP
    DBD-mysql-3.0003/META.yml
    DBD-mysql-3.0003/myld
    DBD-mysql-3.0003/mysql.xs
    DBD-mysql-3.0003/README
    DBD-mysql-3.0003/t/
    DBD-mysql-3.0003/t/00base.t
    DBD-mysql-3.0003/t/10dsnlist.t
    DBD-mysql-3.0003/t/20createdrop.t
    DBD-mysql-3.0003/t/30insertfetch.t
    DBD-mysql-3.0003/t/35limit.t
    DBD-mysql-3.0003/t/40bindparam.t
    DBD-mysql-3.0003/t/40blobs.t
    DBD-mysql-3.0003/t/40listfields.t
    DBD-mysql-3.0003/t/40nulls.t
    DBD-mysql-3.0003/t/40numrows.t
    DBD-mysql-3.0003/t/41blobs_prepare.t
    DBD-mysql-3.0003/t/50chopblanks.t
    DBD-mysql-3.0003/t/50commit.t
    DBD-mysql-3.0003/t/60leaks.t
    DBD-mysql-3.0003/t/dbdadmin.t
    DBD-mysql-3.0003/t/insertid.t
    DBD-mysql-3.0003/t/lib.pl
    DBD-mysql-3.0003/t/mysql.dbtest
    DBD-mysql-3.0003/t/param_values.t
    DBD-mysql-3.0003/t/._prepare_noerror.t
    DBD-mysql-3.0003/t/prepare_noerror.t
    DBD-mysql-3.0003/t/texecute.t
    DBD-mysql-3.0003/TODO
    Removing previously used /home/.cpan/build/DBD-mysql-3.0003
    Package came without SIGNATURE


    CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz

    I will use the following settings for compiling and testing:

    cflags (mysql_config) = -I/usr/include/mysql -g -march=i386 -mcpu=i686
    embedded (mysql_config) =
    libs (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
    mysql_config (guessed ) = mysql_config
    nocatchstderr (default ) = 0

    nofoundrows (default ) = 0

    ssl (guessed ) = 0
    testdb (default ) = test

    testhost (default ) =

    testpassword (default ) =

    testsocket (default ) =

    testuser (default ) =


    To change these settings, see 'perl Makefile.PL --help' and
    'perldoc INSTALL'.

    Checking if your kit is complete...
    Looks good
    Using DBI 1.50 (for perl 5.008007 on i686-linux) installed in /usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/
    Writing Makefile for DBD::mysql
    CPAN: YAML loaded ok
    cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
    cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
    cp lib/Mysql.pm blib/lib/Mysql.pm
    cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
    cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    cc -c -I/usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/ -I/usr/include/mysql -g -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"3.0003\" -DXS_VERSION=\"3.0003\" -fpic "-I/usr/lib/perl5/5.8.7/i686-linux/CORE" dbdimp.c
    /usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI//Driver.xst > mysql.xsi
    /usr/bin/perl /usr/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.7/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
    Warning: duplicate function definition 'do' detected in mysql.xs, line 224
    Warning: duplicate function definition 'rows' detected in mysql.xs, line 559
    cc -c -I/usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/ -I/usr/include/mysql -g -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"3.0003\" -DXS_VERSION=\"3.0003\" -fpic "-I/usr/lib/perl5/5.8.7/i686-linux/CORE" mysql.c
    Running Mkbootstrap for DBD::mysql ()
    chmod 644 mysql.bs
    rm -f blib/arch/auto/DBD/mysql/mysql.so
    LD_RUN_PATH="" /usr/bin/perl myld cc -shared -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
    chmod 755 blib/arch/auto/DBD/mysql/mysql.so
    cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
    chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
    Manifying blib/man3/DBD::mysql.3
    Manifying blib/man3/DBD::mysql::INSTALL.3
    Manifying blib/man3/Mysql.3
    Manifying blib/man3/Bundle::DBD::mysql.3
    /usr/bin/make -- OK
    Running make install
    Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
    Writing /usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBD/mysql/.packlist
    Appending installation info to /usr/lib/perl5/5.8.7/i686-linux/perllocal.pod
    /usr/bin/make install UNINST=1 -- OK
    perlmod--Install done
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    Unable to reset root MySQL password. at /scripts/securemysql line 150.
    Install Complete
     
  5. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    It appears that root is not able to connect to mysql and thus the message. See whether the MySQL password is correct by connecting using

    Code:
    mysql -u root -p
    <your password when asked>
    If this is not letting you in, then you might consider resetting the mysql password. You could do this from WHM->SQL Services -> MySQL Root Password. Once this is done, see if you are able to connect to MySQL server as root.
     
  6. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Ofcourse, the above is mentioned under the assumption that your MySQL server is up and running.
     
  7. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    i typed that in and it didnt ask me for the password, here is what i got

    Code:
    root@fs [~]# mysql - root -p
    mysql  Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0
    Copyright (C) 2002 MySQL AB
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license
    Usage: mysql [OPTIONS] [database]
      -?, --help          Display this help and exit.
      -I, --help          Synonym for -?
      --auto-rehash       Enable automatic rehashing. One doesn't need to use
                          'rehash' to get table and field completion, but startup
                          and reconnecting may take a longer time. Disable with
                          --disable-auto-rehash.
      -A, --no-auto-rehash
                          No automatic rehashing. One has to use 'rehash' to get
                          table and field completion. This gives a quicker start of
                          mysql and disables rehashing on reconnect. WARNING:
                          options deprecated; use --disable-auto-rehash instead.
      -B, --batch         Don't use history file. Disable interactive behavior.
                          (Enables --silent)
      --character-sets-dir=name
                          Directory where character sets are.
      --default-character-set=name
                          Set the default character set.
      -C, --compress      Use compression in server/client protocol.
      -#, --debug[=#]     This is a non-debug version. Catch this and exit
      -D, --database=name Database to use.
      --delimiter=name    Delimiter to be used.
      -e, --execute=name  Execute command and quit. (Disables --force and history
                          file)
      -E, --vertical      Print the output of a query (rows) vertically.
      -f, --force         Continue even if we get an sql error.
      -g, --no-named-commands
                          Named commands are disabled. Use \* form only, or use
                          named commands only in the beginning of a line ending
                          with a semicolon (;) Since version 10.9 the client now
                          starts with this option ENABLED by default! Disable with
                          '-G'. Long format commands still work from the first
                          line. WARNING: option deprecated; use
                          --disable-named-commands instead.
      -G, --named-commands
                          Enable named commands. Named commands mean this program's
                          internal commands; see mysql> help . When enabled, the
                          named commands can be used from any line of the query,
                          otherwise only from the first line, before an enter.
                          Disable with --disable-named-commands. This option is
                          disabled by default.
      -i, --ignore-spaces Ignore space after function names.
      --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
      -b, --no-beep       Turn off beep on error.
      -h, --host=name     Connect to host.
      -H, --html          Produce HTML output.
      -X, --xml           Produce XML output
      --line-numbers      Write line numbers for errors.
      -L, --skip-line-numbers
                          Don't write line number for errors. WARNING: -L is
                          deprecated, use long version of this option instead.
      --no-pager          Disable pager and print to stdout. See interactive help
                          (\h) also. WARNING: option deprecated; use
                          --disable-pager instead.
      --no-tee            Disable outfile. See interactive help (\h) also. WARNING:
                          option deprecated; use --disable-tee instead
      -n, --unbuffered    Flush buffer after each query.
      --column-names      Write column names in results.
      -N, --skip-column-names
                          Don't write column names in results. WARNING: -N is
                          deprecated, use long version of this options instead.
      -O, --set-variable=name
                          Change the value of a variable. Please note that this
                          option is deprecated; you can set variables directly with
                          --variable-name=value.
      --sigint-ignore     Ignore SIGINT (CTRL-C)
      -o, --one-database  Only update the default database. This is useful for
                          skipping updates to other database in the update log.
      --pager[=name]      Pager to use to display results. If you don't supply an
                          option the default pager is taken from your ENV variable
                          PAGER. Valid pagers are less, more, cat [> filename],
                          etc. See interactive help (\h) also. This option does not
                          work in batch mode.
      -p, --password[=name]
                          Password to use when connecting to server. If password is
                          not given it's asked from the tty.
      -P, --port=#        Port number to use for connection.
      --prompt=name       Set the mysql prompt to this value.
      --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
      -q, --quick         Don't cache result, print it row by row. This may slow
                          down the server if the output is suspended. Doesn't use
                          history file.
      -r, --raw           Write fields without conversion. Used with --batch.
      --reconnect         Reconnect if the connection is lost. Disable with
                          --disable-reconnect. This option is enabled by default.
      -s, --silent        Be more silent. Print results with a tab as separator,
                          each row on new line.
      -S, --socket=name   Socket file to use for connection.
      -t, --table         Output in table format.
      -T, --debug-info    Print some debug info at exit.
      --tee=name          Append everything into outfile. See interactive help (\h)
                          also. Does not work in batch mode.
      -u, --user=name     User for login if not current user.
      -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
      -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
      -v, --verbose       Write more. (-v -v -v gives the table output format).
      -V, --version       Output version information and exit.
      -w, --wait          Wait and retry if connection is down.
      --connect_timeout=# Number of seconds before connection timeout.
      --max_allowed_packet=#
                          Max packet length to send to, or receive from server
      --net_buffer_length=#
                          Buffer for TCP/IP and socket communication
      --select_limit=#    Automatic limit for SELECT when using --safe-updates
      --max_join_size=#   Automatic limit for rows in a join when using
                          --safe-updates
      --secure-auth       Refuse client connecting to server if it uses old
                          (pre-4.1.1) protocol
      --show-warnings     Show warnings after every statement.
    
    Default options are read from the following files in the given order:
    /etc/my.cnf ~/.my.cnf
    The following groups are read: mysql client
    The following options may be given as the first argument:
    --print-defaults        Print the program argument list and exit
    --no-defaults           Don't read default options from any options file
    --defaults-file=#       Only read default options from the given file #
    --defaults-extra-file=# Read this file after the global files are read
    
    Variables (--variable-name=value)
    and boolean options {FALSE|TRUE}  Value (after reading options)
    --------------------------------- -----------------------------
    auto-rehash                       TRUE
    character-sets-dir                (No default value)
    default-character-set             latin1
    compress                          FALSE
    database                          (No default value)
    delimiter                         ;
    vertical                          FALSE
    force                             FALSE
    named-commands                    FALSE
    local-infile                      FALSE
    no-beep                           FALSE
    host                              (No default value)
    html                              FALSE
    xml                               FALSE
    line-numbers                      TRUE
    unbuffered                        FALSE
    column-names                      TRUE
    sigint-ignore                     FALSE
    port                              0
    prompt                            mysql>
    quick                             FALSE
    raw                               FALSE
    reconnect                         TRUE
    socket                            (No default value)
    table                             FALSE
    debug-info                        FALSE
    user                              root
    safe-updates                      FALSE
    i-am-a-dummy                      FALSE
    connect_timeout                   0
    max_allowed_packet                16777216
    net_buffer_length                 16384
    select_limit                      1000
    max_join_size                     1000000
    secure-auth                       FALSE
    show-warnings                     FALSE
    root@fs [~]#
    
     
  8. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    mysql -u root -p

    not

    mysql - root -p


    But the easiest fix is probably just "WHM->SQL Services -> MySQL Root Password" in WHM.
     
  9. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    the password i originally had does not work in the mysql -u root -p command so i did: (i replaced my actually pass that has 3 letters and 4 numbers with the word password below)


    MySQL Root Password and got:

    Results of your request
    Mysql password change failed!!
    A forced reset will now be attempted.
    Reset MySQL Password

    Waiting for mysql to restart.....Done
    Changing Password....Done
    Reloading Mysqld...
    Done
    Waiting for mysql to terminate.....

    Restarting MySQL ....Starting MySQL[ OK ] Done

    The MySQL root password has been changed.
    Password changed for root to password



    Reset Local MySQL Root Password and got:

    Waiting for mysql to restart.....Done
    Changing Password....Done
    Reloading Mysqld...
    Done
    Waiting for mysql to terminate.....

    Restarting MySQL ....Starting MySQL[ OK ] Done

    The MySQL root password has been changed.
     
  10. Secret Agent

    Secret Agent Guest

    [edit: wrong thread]
     
    #10 Secret Agent, May 14, 2006
    Last edited by a moderator: May 14, 2006
  11. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    After the mysql root password has been reset, were you able to connect to mysql as root ( mysql -u root -p ) ? You might need to check whether the new password is the correct one in /root/.my.cnf file ( if it exists ) . After this try the mysqlup --force command which I had mentioned earlier.

    Before that you might need to check whether the phpMyAdmin interface is still showing the "Access Denied" message.
     
  12. Bash

    Bash Member

    Joined:
    May 7, 2005
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Same problem....

    -bash-2.05b# mysql -u root -p
    Enter password:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
     
  13. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    It appears that the mysql server is not running. Make sure that mysql is up and running
     
  14. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    i followed instruction and get same error. here is my ssh session and what took place when i did the mysqlup --force, notice at the end it is unable to connect to localhost due to incorrect password. Thanks again for your continued efforts.

    Code:
    root@fs [~]# /scripts/mysqlup --force
    MySQL Setup Script Version 7.0
    Loaded cPPkgs::MySQL ok!
    This is the cPPkgs::MySQL 5.0.18 installer for Linux.
    Preparing...                ########################################### [100%]
       1:MySQL-shared           ########################################### [100%]
    Preparing...                ########################################### [100%]
       1:MySQL-devel            ########################################### [100%]
    Preparing...                ########################################### [100%]
       1:MySQL-embedded         ########################################### [100%]
    Preparing...                ########################################### [100%]
       1:MySQL-client           ########################################### [100%]
    Preparing...                ########################################### [100%]
       1:MySQL-bench            ########################################### [100%]
    Preparing...                ########################################### [100%]
    Giving mysqld a couple of seconds to exit nicely
       1:MySQL-server           ########################################### [100%]
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h fs.fearlessservers.com password 'new-password'
    See the manual for more instructions.
    
    NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
    the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
    able to use the new GRANT command!
    
    Please report any problems with the /usr/bin/mysqlbug script!
    
    The latest information about MySQL is available on the web at
    http://www.mysql.com
    Support MySQL by buying support/licenses at https://order.mysql.com
    Starting MySQL[  OK  ]
    Preparing...                ########################################### [100%]
       1:MySQL-shared           ########################################### [100%]
    /usr/sbin/setfiles:  read 2 specifications
    /usr/sbin/setfiles:  labeling files under /
    /usr/sbin/setfiles:  hash table stats: 1 elements, 1/65536 buckets used, longest cha                                                                         in length 1
    /usr/sbin/setfiles:  Done.
    Method: Perl Expect
    Testing connection speed...(this could take a while)...Done
    Ping:1.508 Testing mirror speed and update status (mirror.hyperian.net) using wget..                                                                         .(1950000 bytes/s)...Done
    Ping:9.765 Testing mirror speed and update status (cpan.belfry.net) using wget...(19                                                                         50000 bytes/s)...Done
    Ping:25.131 Testing mirror speed and update status (cpan.uchicago.edu) using wget...                                                                         (17130 bytes/s)...Done
    Three usable mirrors located
    Mirror Check passed for mirror.hyperian.net (/index.html)
    commit: wrote '/usr/lib/perl5/5.8.7/CPAN/Config.pm'
    CPAN: File::HomeDir loaded ok
    CPAN: Storable loaded ok
    Going to read /home/.cpan/Metadata
      Database was generated on Sun, 14 May 2006 01:26:54 GMT
    Running install for module DBD::mysql
    Running make for C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz
    CPAN: Digest::SHA loaded ok
    CPAN: Module::Signature loaded ok
    WARNING: This key is not certified with a trusted signature!
    Primary key fingerprint: 2E66 557A B97C 19C7 91AF  8E20 328D A867 450F 89EC
    Signature for /home/.cpan/sources/authors/id/C/CA/CAPTTOFU/CHECKSUMS ok
    CPAN: Compress::Zlib loaded ok
    Checksum for /home/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz ok
    Scanning cache /home/.cpan/build for sizes
    DBD-mysql-3.0003/
    DBD-mysql-3.0003/ChangeLog
    DBD-mysql-3.0003/constants.h
    DBD-mysql-3.0003/dbdimp.c
    DBD-mysql-3.0003/dbdimp.h
    DBD-mysql-3.0003/INSTALL.html
    DBD-mysql-3.0003/lib/
    DBD-mysql-3.0003/lib/Bundle/
    DBD-mysql-3.0003/lib/Bundle/DBD/
    DBD-mysql-3.0003/lib/Bundle/DBD/mysql.pm
    DBD-mysql-3.0003/lib/DBD/
    DBD-mysql-3.0003/lib/DBD/mysql/
    DBD-mysql-3.0003/lib/DBD/mysql/GetInfo.pm
    DBD-mysql-3.0003/lib/DBD/mysql/INSTALL.pod
    DBD-mysql-3.0003/lib/DBD/mysql.pm
    DBD-mysql-3.0003/lib/Mysql/
    DBD-mysql-3.0003/lib/Mysql/Statement.pm
    DBD-mysql-3.0003/lib/Mysql.pm
    DBD-mysql-3.0003/Makefile.PL
    DBD-mysql-3.0003/Makefile.PL.embedded
    DBD-mysql-3.0003/MANIFEST
    DBD-mysql-3.0003/MANIFEST.SKIP
    DBD-mysql-3.0003/META.yml
    DBD-mysql-3.0003/myld
    DBD-mysql-3.0003/mysql.xs
    DBD-mysql-3.0003/README
    DBD-mysql-3.0003/t/
    DBD-mysql-3.0003/t/00base.t
    DBD-mysql-3.0003/t/10dsnlist.t
    DBD-mysql-3.0003/t/20createdrop.t
    DBD-mysql-3.0003/t/30insertfetch.t
    DBD-mysql-3.0003/t/35limit.t
    DBD-mysql-3.0003/t/40bindparam.t
    DBD-mysql-3.0003/t/40blobs.t
    DBD-mysql-3.0003/t/40listfields.t
    DBD-mysql-3.0003/t/40nulls.t
    DBD-mysql-3.0003/t/40numrows.t
    DBD-mysql-3.0003/t/41blobs_prepare.t
    DBD-mysql-3.0003/t/50chopblanks.t
    DBD-mysql-3.0003/t/50commit.t
    DBD-mysql-3.0003/t/60leaks.t
    DBD-mysql-3.0003/t/dbdadmin.t
    DBD-mysql-3.0003/t/insertid.t
    DBD-mysql-3.0003/t/lib.pl
    DBD-mysql-3.0003/t/mysql.dbtest
    DBD-mysql-3.0003/t/param_values.t
    DBD-mysql-3.0003/t/._prepare_noerror.t
    DBD-mysql-3.0003/t/prepare_noerror.t
    DBD-mysql-3.0003/t/texecute.t
    DBD-mysql-3.0003/TODO
    Removing previously used /home/.cpan/build/DBD-mysql-3.0003
    Package came without SIGNATURE
    
    
      CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-3.0003.tar.gz
    
    I will use the following settings for compiling and testing:
    
      cflags        (mysql_config) = -I/usr/include/mysql -g -march=i386 -mcpu=i686
      embedded      (mysql_config) =
      libs          (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -l                                                                         m
      mysql_config  (guessed     ) = mysql_config
      nocatchstderr (default     ) = 0
    
      nofoundrows   (default     ) = 0
    
      ssl           (guessed     ) = 0
      testdb        (default     ) = test
    
      testhost      (default     ) =
    
      testpassword  (default     ) =
    
      testsocket    (default     ) =
    
      testuser      (default     ) =
     
  15. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    had to split the code section into two parts due to length. continued in this post

    Code:
    To change these settings, see 'perl Makefile.PL --help' and
    'perldoc INSTALL'.
    
    Checking if your kit is complete...
    Looks good
    Using DBI 1.50 (for perl 5.008007 on i686-linux) installed in /usr/lib/perl5/site_pe                                                                         rl/5.8.7/i686-linux/auto/DBI/
    Writing Makefile for DBD::mysql
    CPAN: YAML loaded ok
    cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
    cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
    cp lib/Mysql.pm blib/lib/Mysql.pm
    cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
    cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    cc -c  -I/usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/ -I/usr/include/mysql -g                                                                          -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe                                                                          -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm                                                                          -O2   -DVERSION=\"3.0003\" -DXS_VERSION=\"3.0003\" -fpic "-I/usr/lib/perl5/5.8.7/i6                                                                         86-linux/CORE"   dbdimp.c
    /usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/site_perl/5.8.7/i686-linux/a                                                                         uto/DBI//Driver.xst > mysql.xsi
    /usr/bin/perl /usr/lib/perl5/5.8.7/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.7/Ex                                                                         tUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
    Warning: duplicate function definition 'do' detected in mysql.xs, line 224
    Warning: duplicate function definition 'rows' detected in mysql.xs, line 559
    cc -c  -I/usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/ -I/usr/include/mysql -g                                                                          -march=i386 -mcpu=i686 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe                                                                          -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm                                                                          -O2   -DVERSION=\"3.0003\" -DXS_VERSION=\"3.0003\" -fpic "-I/usr/lib/perl5/5.8.7/i6                                                                         86-linux/CORE"   mysql.c
    Running Mkbootstrap for DBD::mysql ()
    chmod 644 mysql.bs
    rm -f blib/arch/auto/DBD/mysql/mysql.so
    LD_RUN_PATH="" /usr/bin/perl myld cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o                                                                          blib/arch/auto/DBD/mysql/mysql.so   -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl                                                                          -lm
    chmod 755 blib/arch/auto/DBD/mysql/mysql.so
    cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
    chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
    Manifying blib/man3/DBD::mysql.3
    Manifying blib/man3/DBD::mysql::INSTALL.3
    Manifying blib/man3/Mysql.3
    Manifying blib/man3/Bundle::DBD::mysql.3
      /usr/bin/make  -- OK
    Running make install
    Files found in blib/arch: installing files in blib/lib into architecture dependent l                                                                         ibrary tree
    Writing /usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBD/mysql/.packlist
    Appending installation info to /usr/lib/perl5/5.8.7/i686-linux/perllocal.pod
      /usr/bin/make install UNINST=1 -- OK
    perlmod--Install done
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    Unable to reset root MySQL password. at /scripts/securemysql line 150.
    Install Complete
    root@fs [~]#
     
  16. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    It still appears that root is not able to connect to mysql. Did you try the "mysql -u root -p " command to see if you are able to connect to?. Also did you check whether the password in /root/.my.cnf is tha same as the one you have reset to?
     
  17. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    yes, the /root/.my.cnf is updated with the new password i use when i change the password via the MySQL root password link in whm. i attempted the mysql -u root -p and i enter in the password and it give me ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    the contents of the .my.cnf file is:

    Code:
    [client]
    user="root"
    pass="apple"
    
    i reboot the server and an email is sent to me that says cpsrvd failed @ Tue May 16 07:41:54 2006. A restart was attempted automagicly.
    i get this email every time i restart the server. (when i say restart the server i mean doing a graceful server reboot in whm)
     
  18. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    also, if i stop the mysql service then start it with mysqld_safe --skip-grant-tables i can then connect to phpmyadmin but if i restart server i no longer can access it and i get the Wrong username/password. Access denied. error.
     
  19. neojones

    neojones Active Member

    Joined:
    Dec 14, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    It appears that root@localhost is not having proper access to the databases. You get to the mysql prompt by using --skip-grant-tables option and then issue the following command
    Code:
    UPDATE user SET Password=PASSWORD('newpassword') WHERE Host='localhost' AND User='root';
    Here is a tip for doing the same step by step:
    Code:
    1. ) First check whether any MySQL processes are running. Use ps -aux | grep sql
    
    2. ) Kill any MySQL process that is running. kill -9 processnumber
    
    3. ) /etc/init.d/mysql stop ( Or /etc/init.d/mysqld stop )
    
    4. ) /etc/init.d/mysql stop ( Just for confirmation )
    
    5. ) Use ps aux again to verify whether any mysql process exists.
    
    6. ) You might also need to stop the chkservd process /etc/init.d/chkservd stop
    
    7. ) mysqld_safe --skip-grant-tables & Make sure to include the &.
    You must do the rest as fast as possible as any user who tries to connect during this period will be having full access to the server's database.
    make sure that no MySQL process is existing before you issue this command.
    
    8. ) mysql mysql This will take you to the MySQL prompt.
    
    9. ) At the MySQL prompt issue the following commands. You might need to know the hostname first. Use hostnamefor it.
    
    UPDATE user SET Password=PASSWORD('newpassword') WHERE Host='localhost' AND User='root';
    UPDATE user SET Password=PASSWORD('newpassword') WHERE Host='myhost.mydomain.com' AND User='root';
    exit;
    
    Here myhost.mydomain.com is your server's hostname and 'newpassword' is your current mysql root password to which.
    
    10.) Now again use ps aux | grep sql
    
    11.) Kill all the process associated. There will mostly be 4 process.
    
    12.) Now start the service /etc/init.d/mysql start
    
    13.) Try connecting to MySQL now using the command mysql -u root -p and then provide the new password.
    
    14.) If you got connected, edit /root/.my.cnf and change the password in that file to the new one.
    
    15.) If this failed, start the steps from the start again. This should fix the issue. Else check the logs.
    Once this is done try connecting to mysql as root the usual way. If it is successful, then try the phpMyAdmin interface.

    Hope this is useful
     
  20. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    First i would like to say thank you for that very details instruction, i truely appreciate your time. I followed through it twice and still am not able to connect. below is a copy, paste from my ssh session.


    Code:
    root@fs [/]# mysqld_safe --skip-grant-tables &
    [1] 18442
    root@fs [/]# Starting mysqld daemon with databases from /var/lib/mysql
    mysql mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 5.0.18-standard
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> UPDATE user SET Password=PASSWORD('apple') WHERE Host='localhost' AND User=               'root';
    Query OK, 1 row affected, 1 warning (0.01 sec)
    Rows matched: 1  Changed: 1  Warnings: 1
    
    mysql> UPDATE user SET Password=PASSWORD('apple') WHERE Host='fs.mydomain.c               om' AND User='root';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 0  Changed: 0  Warnings: 0
    
    mysql> exit;
    Bye
    root@fs [/]# ps -aux | grep sql
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
    root     18442  0.0  0.2  4836 1092 pts/0    S    08:29   0:00 /bin/sh /usr/bin/my               sqld_safe --skip-grant-tables
    mysql    18460  0.0  3.2 117076 14572 pts/0  Sl   08:29   0:00 /usr/sbin/mysqld --               basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/fs.mydomain.com.pid --skip-locking --skip-grant-tables
    root     18722  0.0  0.1  4800  656 pts/0    S+   08:32   0:00 grep sql
    root@fs [/]# kill -9 18460
    root@fs [/]# /usr/bin/mysqld_safe: line 384: 18460 Killed                  nohup /               usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/               lib/mysql/fs.mydomain.com.pid --skip-locking --skip-grant-tables >>/var/lib               /mysql/fs.mydomain.com.err 2>&1
    
    Number of processes running now: 0
    060517 08:32:45  mysqld restarted
    mysql mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 5.0.18-standard
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> exit;
    Bye
    root@fs [/]# ps -aux | grep sql
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
    root     18442  0.0  0.2  4840 1116 pts/0    S    08:29   0:00 /bin/sh /usr/bin/my               sqld_safe --skip-grant-tables
    mysql    18741  0.2  3.1 116880 14100 pts/0  Sl   08:32   0:00 /usr/sbin/mysqld --               basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/fs.mydomain.com.pid --skip-locking --skip-grant-tables
    root     18754  0.0  0.1  4408  636 pts/0    R+   08:33   0:00 grep sql
    root@fs [/]# kill -9 18442
    root@fs [/]# kill -9 18741
    [1]+  Killed                  mysqld_safe --skip-grant-tables
    root@fs [/]# kill -9 18754
    -bash: kill: (18754) - No such process
    root@fs [/]# ps -aux | grep sql
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
    root     18763  0.0  0.1  4136  636 pts/0    R+   08:33   0:00 grep sql
    root@fs [/]# kill -9 root
    -bash: kill: root: arguments must be process or job IDs
    root@fs [/]# ps -aux | grep sql
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
    root     18765  0.0  0.1  4708  636 pts/0    R+   08:34   0:00 grep sql
    root@fs [/]# /etc/init.d/mysql start
    Starting MySQL                                             [  OK  ]
    root@fs [/]# mysql -u root -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES               )
    root@fs [/]#
    

    i notice here where it says "/usr/sbin/mysqld -- basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/fs.mydomain.com.pid --skip-locking --skip-grant-tables"
    is this supposed to show user=mysql? i did a mysql -u mysql -p and typed in the password and got ERROR 1045 (28000): Access denied for user 'mysql'@'localhost' (using password: YES)

    the contents of my /root/.my.cnf file is :
    [client]
    user="mysql"
    pass="apple"


    is also have a /root/my.cnf which just has:
    apple
     
Loading...

Share This Page