List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:March 6 2000 2:30pm
Subject:Re: Access denied for user: 'root@localhost'
View as plain text  
Andrés writes:
 > Hello.
 > 
 > I installed MySQL and the daemon works. The problem has come when I first
 > tried to use it. I have read everything (the manual and the mailing list). I
 > have executed mysql_install_db but I still can do nothing.
 > 
 > I have looked for these files but none of them exist (and I don't know how
 > can I create them as I've executed mysql_install_db and nothing new
 > happens):
 > - mysql.user
 > - mysql.db
 > - mysql.host
 > - my.cnf
 > 
 > My Linux system is RedHat 6.0.
 > 
 > Here are my tests and error mesages:
 > 
 > [root@localhost /root]# mysqladmin variables
 > mysqladmin: connect to server at 'localhost' failed
 > error: 'Access denied for user: 'root@localhost' (Using password: NO)'
 > 
 > [root@localhost /root]# mysqladmin -h server.com variables
 > mysqladmin: connect to server at 'server.com' failed
 > error: 'Host 'server.com' is not allowed to connect to this MySQL server'
 > 
 > [root@localhost /root]# mysql -u root mysql
 > ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
 > 
 > [root@localhost /root]# mysql -u root test
 > ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
 > 
 > [root@localhost /root]# mysql -h server.com -u root test
 > ERROR 1130: Host 'server.com' is not allowed to connect to this MySQL server
 > 
 > [root@localhost /root]# mysql mysql
 > ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
 > 
 > [root@localhost /root]# mysqladmin --print-defaults
 > mysqladmin would have been started with the following arguments:
 > 
 > [root@localhost /root]# mysqladmin -u root shutdown
 > mysqladmin: connect to server at 'localhost' failed
 > error: 'Access denied for user: 'root@localhost' (Using password: NO)'
 > 
 > [root@localhost /root]# mysqladmin version
 > mysqladmin: connect to server at 'localhost' failed
 > error: 'Access denied for user: 'root@localhost' (Using password: NO)'
 > 
 > Please help me because I don't know what's going wrong.
 > 
 > Let me say that I'm a newbe with MySQL, so I know nearly nothing about data
 > bases :-( so please tell me which commands I have to execute.
 > 
 > Bye.


Hi!

Seems like you have got a root password already.

Start a server with --skip-grant-table and run:

select * from user where user='root';

And see if there is password. You can change it manually with UPDATE
and PASSWORD() function.

Regards,

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
Access denied for user: 'root@localhost'Andrés5 Mar
  • Re: Access denied for user: 'root@localhost'sinisa6 Mar
RE: Access denied for user: 'root@localhost'Andrés6 Mar
  • RE: Access denied for user: 'root@localhost'sinisa6 Mar
Re: Access denied for user: 'root@localhost'curt6 Mar
RE: Access denied for user: 'root@localhost'Andrés6 Mar
  • RE: Access denied for user: 'root@localhost'sinisa6 Mar