Problem creating root password MySQL in FC6

Tony Nelson tonynelson at georgeanelson.com
Mon Jul 30 00:59:26 UTC 2007


At 9:19 AM -0700 7/29/07, Barry Yu wrote:
>Steve Searle <steve at stevesearle.com> wrote:
>
>Around 07:53am on Sunday, July 29, 2007 (UK time), Barry Yu scrawled:
>
>> I tried your link to your webpage but getting "Server not found", your
>> server is down?
>
>Oops - that was the copy on the local server. Try this:
>http://www.stevesearle.com/tech/centos5.0.svr.html#mysql
>
>Steve
>
>--
>
>Play Champions - my free football predictions game at:
>http://www.stevesearle.com/champs/about.html
>
>
>--
>fedora-list mailing list
>fedora-list at redhat.com
>To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
>Still can't login as root;
>
>[root at localhost ~]# service mysqld start
>    Starting MySQL                          [OK]
>[root at localhost ~]# mysql -u root
>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>password: NO)
>
>I've been searching with Google and found that I am not alone in this
>proble but unfortunately there wasn't any solution that I can find helpful
>to resolve this issue, seems before I set a password for root user (Create
>one after the initial installation and before using MySQL) there is one
>existing already and I don't know what it is. I even yum removed MySQL and
>then yum groupinstall mysql to make sure a fresh installation of MySQL is
>being used.
>
>I had tried followings;
>[root at localhost ~]# mysqladmin -u root password -p mypassword123
>Enter password:
>mysqladmin: connect to server at 'localhost' failed
>error: 'Access denied for user 'root'@'localhost' (using password: YES)'
>[root at localhost ~]# mysql -u root
>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>password: NO)
>[root at localhost ~]# mysql -u root -p
>Enter password: (I enter blank RETURN key)
>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>password: NO)

To reset the root password without knowing it, start mysqld without using
the grant tables:

    Per Resetting a forgotten MySQL root password:
        http://www.debian-administration.org/articles/442
    []# service mysqld stop         # mysqld must be stopped
    []# /usr/bin/mysqld_safe --skip-grant-tables &
    []# mysql -uroot mysql
    mysql> update user set Password=PASSWORD('new-pw') WHERE User='root';
    mysql> quit

Here my instructions are a bit loopy.  Probably the PID to kill is the one
reported above.

    []# ps -ef | grep mysql
    []# kill [the second PID]
    []# fg          # so the shell stops too
    []# service mysqld start
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20070729/e9c22fe5/attachment-0002.html 


More information about the users mailing list