List:General Discussion« Previous MessageNext Message »
From:Erick Ocrospoma Date:January 13 2014 6:35pm
Subject:Re: Access denied for user 'root'@'localhost' (using password: YES)
on mysql admin
View as plain text  
On 13 January 2014 13:25, Érico <ericomtx@stripped> wrote:
> the granting is not affecting the tables:
>
> mysql> grant all privileges on *.* to root@localhost identified by 'pwd';
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> FLUSH PRIVILEGES;
> Query OK, 0 rows affected (0.00 sec)
>
> ...
>
> and if I try the granting in 127.0.0.1 :
> mysql> grant all privileges to *.* 'root'@'127.0.0.1' identified by
> kernel26;
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to use
> near 'to *.* 'root'@'127.0.0.1' identified by kernel26' at line 1
It's my error :)  It should be:

mysql> grant all privileges on *.* to 'root'@'127.0.0.1' identified by
'kernel26';
>
> ...
>
>
> in eclipse using jconnector ... I get the same error :
> when pinging :
>
> java.sql.SQLException: Access denied for user 'root'@'localhost' (using
> password: YES)
>     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1086)
>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
>
> ....
>
> Could not connect to New MySQL.
> Error creating SQL Model Connection connection to New MySQL. (Error: Access
> denied for user 'root'@'localhost' (using password: YES))
> Access denied for user 'root'@'localhost' (using password: YES)
>
>
>
>
> 2014/1/13 Erick Ocrospoma <zipper1790@stripped>
>
>> I forgot this. Do it too.
>>
>> On 13 January 2014 13:01, Erick Ocrospoma <zipper1790@stripped> wrote:
>> > I presume your index.php file uses "127.0.0.1". After login to MySQL try
>> this:
>> >
>> > $> grant all privileges to *.* 'root'@'127.0.0.1' identified by
>> <yourpassword>;
>> $> flush privileges;
>> >
>> > Of course this could not be the best solution, it's just to skip it,
>> > you must look at the query/connection on your php file.
>> >
>> > On 13 January 2014 12:57, Érico <ericomtx@stripped> wrote:
>> >> using localhost the coonection works ...
>> >> ericomtxmacbookpro:bin ericomtx$ ./mysql -u root -p mysql-admin -h
>> localhost
>> >> -P 3306
>> >> Enter password:
>> >> 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 97
>> >>
>> >> Server version: 5.6.15 MySQL Community Server (GPL)
>> >>
>> >>
>> >> ........
>> >>
>> >> but using 127.0.0.1 no :
>> >>
>> >> ericomtxmacbookpro:bin ericomtx$ ./mysql -u root -p mysql-admin -h
>> 127.0.0.1
>> >> -P 3306
>> >> Enter password:
>> >> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
>> >> password: YES)
>> >> ericomtxmacbookpro:bin ericomtx$
>> >>
>> >>
>> >>
>> >> 2014/1/13 Erick Ocrospoma <zipper1790@stripped>
>> >>>
>> >>> From that error I would suspect you are trying to access to a
> database
>> >>> where has not external access. And yeah, try by doing
>> >>>
>> >>> $> mysql -u root -p <database> -h localhost -P 3306
>> >>>
>> >>> change localhost by 127.0.0.1 in order to test if both cases work,
> and
>> >>> see which of them (localhost/127.0.0.1) is defined in your web app
> as
>> >>> you've been told in the mail before.
>> >>>
>> >>> On 13 January 2014 12:36, Reindl Harald
> <h.reindl@stripped>
>> wrote:
>> >>> >
>> >>> >
>> >>> > Am 13.01.2014 18:28, schrieb Érico:
>> >>> >> ericomtxmacbookpro:bin ericomtx$ ./mysql -u root -p
> mysql-admin
>> >>> >> Enter password:
>> >>> >> Welcome to the MySQL monitor.  Commands end with ; or \g.
>> >>> >> Your MySQL connection id is 31
>> >>> >> Server version: 5.6.15 MySQL Community Server (GPL)>
>> >>> >>
>> >>> >> but in the browser I get the error :
>> >>> >>
>> >>> >> Access denied for user 'root'@'localhost' (using password:
> YES)
>> >>> >>
>> >>> >> I can't find any information in error log and access log
>> >>> >>
>> >>> >> is there any command parameter that I should use when
> starting
>> mysql so
>> >>> >> this doesn't happen?
>> >>> >
>> >>> > are you using "localhost" or "127.0.0.1" in the
> web-application
>> >>> > root@localhost != root@stripped = different users
>> >>> >
>> >>> > localhost: Unix-Socket
>> >>> > 127.0.0.1: TCP
>> >>> >
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ~ Happy install !
>> >>>
>> >>>
>> >>>
>> >>> Erick.
>> >>>
>> >>>
>> >>> ---
>> >>>
>> >>> Cellphone   :  +51 950307809
>> >>> Blog    :  http://zerick.me/
>> >>> LUG    :  http://www.utpinux.org
>> >>> IRC     :   zerick
>> >>> About :  http://about.me/zerick
>> >>> Linux User ID :  549567
>> >>>
>> >>> --
>> >>> MySQL General Mailing List
>> >>> For list archives: http://lists.mysql.com/mysql
>> >>> To unsubscribe:    http://lists.mysql.com/mysql
>> >>>
>> >>
>> >
>> >
>> >
>> > --
>> >
>> >
>> >
>> >
>> >
>> > ~ Happy install !
>> >
>> >
>> >
>> > Erick.
>> >
>> >
>> > ---
>> >
>> > Cellphone   :  +51 950307809
>> > Blog    :  http://zerick.me/
>> > LUG    :  http://www.utpinux.org
>> > IRC     :   zerick
>> > About :  http://about.me/zerick
>> > Linux User ID :  549567
>>
>>
>>
>> --
>>
>>
>>
>>
>>
>> ~ Happy install !
>>
>>
>>
>> Erick.
>>
>>
>> ---
>>
>> Cellphone   :  +51 950307809
>> Blog    :  http://zerick.me/
>> LUG    :  http://www.utpinux.org
>> IRC     :   zerick
>> About :  http://about.me/zerick
>> Linux User ID :  549567
>>



-- 





~ Happy install !



Erick.


---

Cellphone   :  +51 950307809
Blog    :  http://zerick.me/
LUG    :  http://www.utpinux.org
IRC     :   zerick
About :  http://about.me/zerick
Linux User ID :  549567
Thread
Access denied for user 'root'@'localhost' (using password: YES) onmysql adminÉrico13 Jan 2014
  • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminReindl Harald13 Jan 2014
    • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminErick Ocrospoma13 Jan 2014
      • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico13 Jan 2014
        • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminErick Ocrospoma13 Jan 2014
          • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminErick Ocrospoma13 Jan 2014
            • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico13 Jan 2014
              • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminErick Ocrospoma13 Jan 2014
                • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico13 Jan 2014
                  • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminshawn l.green13 Jan 2014
                    • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico13 Jan 2014
                      • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminReindl Harald13 Jan 2014
                        • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminshawn l.green13 Jan 2014
                          • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminReindl Harald13 Jan 2014
    • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico13 Jan 2014
      • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminReindl Harald13 Jan 2014
Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico14 Jan 2014
  • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminClaudio Nanni15 Jan 2014
    • Re: Access denied for user 'root'@'localhost' (using password: YES)on mysql adminÉrico16 Jan 2014