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

Hi,

I experienced the following error and I had try to reinstall mysql (some one
make the error goes away after reinstall, but not to me), and search the
message archive from the list but did not get any luck. On top of that, I
also have some questions:

  • I run mysqladmin -u root -p it works
  • in mysqladmin help, it says "Default options are read from the following
    files in the given order: /etc/my.cnf /usr/local/mysql/var/my.cnf ~/.my.cnf"
    but I never find any of those files.

What should I do to make the error go away? Your help is highly appreciated,
thanks.

make install

mkdir -p //opt/rt2/bin
mkdir -p //opt/rt2/WebRT/data
mkdir -p //opt/rt2/WebRT/sessiondata
mkdir -p //opt/rt2/etc
mkdir -p //opt/rt2/lib
mkdir -p //opt/rt2/WebRT/html
mkdir -p //opt/rt2/local/WebRT/html
/usr/bin/perl tools/initdb ‘mysql’ ‘/usr/local/mysql’ ‘localhost’ ‘’
‘root’ ‘rt2’ create
Now creating a database for RT.
Enter the mysql password for root:
Creating mysql database rt2.
cp etc/acl.mysql ‘//opt/rt2/etc/acl.mysql’
/usr/bin/perl -p -i -e " s’!!DB_TYPE!!’“mysql”‘g;
s’!!DB_HOST!!’“localhost”‘g;
s’!!DB_RT_PASS!!’""‘g;
s’!!DB_RT_HOST!!’“localhost”‘g;
s’!!DB_RT_USER!!’“rt”‘g;
s’!!DB_DATABASE!!’“rt2”'g;" //opt/rt2/etc/acl.mysql
bin/initacls.mysql ‘/usr/local/mysql’ ‘localhost’ ‘’ ‘root’ '“123456” '
‘rt2’ '//opt/rt2/etc/acl.mysql’
Enter the mysql administrator’s database password to create a new user for
RT
ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: YES)
Enter the mysql administrator’s database password to nondestructively reload
the database
/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: 'Access denied for user: ‘root@localhost’ (Using password: YES)'
make: *** [acls] Error 1

-jerry

Hi,

I experienced the following error and I had try to reinstall mysql (some
one make the error goes away after reinstall, but not to me), and search
the message archive from the list but did not get any luck. On top of
that, I also have some questions:

  • I run mysqladmin -u root -p it works
  • in mysqladmin help, it says “Default options are read from the
    following files in the given order: /etc/my.cnf
    /usr/local/mysql/var/my.cnf ~/.my.cnf” but I never find any of those
    files.

What should I do to make the error go away? Your help is highly
appreciated, thanks.

make install

mkdir -p //opt/rt2/bin
mkdir -p //opt/rt2/WebRT/data
mkdir -p //opt/rt2/WebRT/sessiondata
mkdir -p //opt/rt2/etc
mkdir -p //opt/rt2/lib
mkdir -p //opt/rt2/WebRT/html
mkdir -p //opt/rt2/local/WebRT/html
/usr/bin/perl tools/initdb ‘mysql’ ‘/usr/local/mysql’ ‘localhost’ ‘’
‘root’ ‘rt2’ create
Now creating a database for RT.
Enter the mysql password for root:
Creating mysql database rt2.
cp etc/acl.mysql ‘//opt/rt2/etc/acl.mysql’
/usr/bin/perl -p -i -e " s’!!DB_TYPE!!‘“mysql”‘g;
s’!!DB_HOST!!’“localhost”‘g;
s’!!DB_RT_PASS!!‘“”‘g;
s’!!DB_RT_HOST!!’“localhost”‘g;
s’!!DB_RT_USER!!‘“rt”‘g;
s’!!DB_DATABASE!!’“rt2”'g;"
//opt/rt2/etc/acl.mysql
bin/initacls.mysql ‘/usr/local/mysql’ ‘localhost’ ‘’ ‘root’ '“123456”
’ ‘rt2’ ‘//opt/rt2/etc/acl.mysql’
Enter the mysql administrator’s database password to create a new user
for RT
ERROR 1045: Access denied for user: ‘root@localhost’ (Using password:
YES) Enter the mysql administrator’s database password to
nondestructively reload the database
/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user: ‘root@localhost’ (Using password: YES)’
make: *** [acls] Error 1

-jerry


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Hi,

I experienced the following error and I had try to reinstall mysql (some one
make the error goes away after reinstall, but not to me), and search the
message archive from the list but did not get any luck. On top of that, I
also have some questions:

That error should not make you reinstall mysql. What you normally should do
when you forget the root password for mysql is to follow the instructions
below:

http://www.mysql.com/doc/en/Resetting_permissions.html

  • I run mysqladmin -u root -p it works
  • in mysqladmin help, it says “Default options are read from the following
    files in the given order: /etc/my.cnf /usr/local/mysql/var/my.cnf ~/.my.cnf”
    but I never find any of those files.

You can find samples of the files by doing:

find /usr/local/ -type f -name “my-*”

On a FreeBSD system with MySQL installed from the ports, the files would be
found in /usr/local/share/mysql. You need to look at the sample files and
decide which one best decsribes your site requirements and then copy it to
/etc/my.cnf, then edit the values that your requirements dictate that you
change.

What should I do to make the error go away? Your help is highly appreciated,
thanks.

                    s'!!DB_DATABASE!!'"rt2"'g;" //opt/rt2/etc/acl.mysql

bin/initacls.mysql ‘/usr/local/mysql’ ‘localhost’ ‘’ ‘root’ '“123456” ’
‘rt2’ ‘//opt/rt2/etc/acl.mysql’
Enter the mysql administrator’s database password to create a new user for
RT
ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: YES)
Enter the mysql administrator’s database password to nondestructively reload
the database
/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user: ‘root@localhost’ (Using password: YES)’
make: *** [acls] Error 1

Well, follow the instructions above, set the correct password for root in
/etc/my.cnf and also in the Makefile for rt2 and you’ll mostly succeed.

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post