Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Hi I have installed mysql admin on my local environment I am able to connect to mysql through command line : 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) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql ... 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 ? I am starting it this way : sudo ./mysql.server start my /etc/hosts file : ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local 127.0.0.1 mysqld Thks Érico
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
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@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP signature.asc Description: OpenPGP digital signature
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
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.rei...@thelounge.net 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@127.0.0.1 = 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
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
using both urls I get the same error : http://localhost/mysql/index.php http://127.0.0.1/mysql/index.php in 127.0.0.1... after I submit the index.php ... it redirects to localhost too .. 2014/1/13 Reindl Harald h.rei...@thelounge.net 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@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
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; 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 erico...@gmail.com 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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
I forgot this. Do it too. On 13 January 2014 13:01, Erick Ocrospoma zipper1...@gmail.com 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 erico...@gmail.com 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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
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 ... 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 zipper1...@gmail.com I forgot this. Do it too. On 13 January 2014 13:01, Erick Ocrospoma zipper1...@gmail.com 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 erico...@gmail.com 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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
On 13 January 2014 13:25, Érico erico...@gmail.com 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 zipper1...@gmail.com I forgot this. Do it too. On 13 January 2014 13:01, Erick Ocrospoma zipper1...@gmail.com 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 erico...@gmail.com 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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:
Re: grouping by the difference between values in rows
On Mon, Jan 13, 2014 at 2:43 AM, Peter Brawley peter.braw...@earthlink.net wrote: On 2014-01-12 9:13 PM, Larry Martell wrote: On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley peter.braw...@earthlink.net wrote: On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f FROM t GROUP BY a, b, c, d, f x and y are numbers (378.18, 2213.797 or 378.218, 2213.949 or 10053.490, 2542.094). The business issue is that if either x or y in 2 rows that are in the same a, b, c, d group are within 1 of each other then they should be grouped together. And to make it more complicated, the tolerance is applied as a rolling continuum. For example, if the x and y in a set of grouped rows are: row 1: 1.5, 9.5 row 2: 2.4, 20.8 row 3: 3.3, 40.6 row 4: 4.2, 2.5 row 5: 5.1, 10.1 row 6: 6.0, 7.9 row 7: 8.0, 21.0 row 8: 100, 200 1 through 6 get combined because all their X values are within the tolerance of some other X in the set that's been combined. 7's Y value is within the tolerance of 2's Y, so that should be combined as well. 8 is not combined because neither the X or Y value is within the tolerance of any X or Y in the set that was combined. In python I can easily parse the data and identify the rows that need to be combined, but then I've lost the ability to calculate the average and std. The only way I can think of to do this is to remove the grouping from the SQL and do all the grouping and aggregating myself. But this query often returns 20k to 30k rows after grouping. It could easily be 80k to 100k rows that I have to process if I remove the grouping and I think that will be very slow. Anyone have any ideas? Could you compute the row-to-row values write them to a temp table, then run the SQL that incorporates that result column? I thought of temp tables, but I could not come up with a way to use them for this. How can I apply the x/y tolerance grouping in sql? Run the query you showed, saving the result to a temp table. In an sproc or your preferred app language, do the row-to-row processing to generate a new column in the temp table from the biz rules you outlined, now query the revised temp table as desired. Not too clear on how this will help me. The issue with the query I showed is that I don't have the individual rows that make up the aggregate data of the rows I need to combine. I think I have to run a query with no group by and do all the grouping and aggregation myself. In any case, unfortunately this has been made a low priority task and I've been put on to something else (I hate when they do that). I'll revive this thread when I'm allowed to get back on this. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Hi didn't work look ... isn't this something related to this : are you using localhost or 127.0.0.1 in the web-application root@localhost != root@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP ... since I am not able to stabilsh a connection even with using eclipse ... my /etc/hosts file : ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local #127.0.0.1 mysqld 2014/1/13 Erick Ocrospoma zipper1...@gmail.com On 13 January 2014 13:25, Érico erico...@gmail.com 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 zipper1...@gmail.com I forgot this. Do it too. On 13 January 2014 13:01, Erick Ocrospoma zipper1...@gmail.com 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 erico...@gmail.com 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 zipper1...@gmail.com 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.rei...@thelounge.net 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@127.0.0.1 = 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 !
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Hello Érico, On 1/13/2014 1:49 PM, Érico wrote: Hi didn't work look ... isn't this something related to this : are you using localhost or 127.0.0.1 in the web-application root@localhost != root@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP ... since I am not able to stabilsh a connection even with using eclipse ... my /etc/hosts file : ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local #127.0.0.1 mysqld The thing to remember is that 'localhost' or '127.0.0.1' is where the server believes the connection is coming from. The password you must be using in your client connection attempt must match the one used on the server for the mysql user 'root'@'localhost' or you will not authenticate. You also need to remember that if your .php page is on a different machine, it is not connecting to the same mysqld that you have running in your development machine (your personal environment). Your .PHP page is trying to connect to the one running on its host machine. That user 'root' may have an entirely different password. Your programs are connecting fine. If they didn't you would get a different message. They are failing to authenticate which means that the mysqld they are connecting to does not recognize the password you are using for the account you are trying to authenticate as. Regards, -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Hi no connections outside command line are being accepted . I have connected through command line , but not using eclipse for example ... it gets the same error from the web app my apache and pages are in the same computer that mysql I am not getting password issues.. otherwise I would not connect through command line Thks 2014/1/13 shawn l.green shawn.l.gr...@oracle.com Hello Érico, On 1/13/2014 1:49 PM, Érico wrote: Hi didn't work look ... isn't this something related to this : are you using localhost or 127.0.0.1 in the web-application root@localhost != root@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP ... since I am not able to stabilsh a connection even with using eclipse ... my /etc/hosts file : ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local #127.0.0.1 mysqld The thing to remember is that 'localhost' or '127.0.0.1' is where the server believes the connection is coming from. The password you must be using in your client connection attempt must match the one used on the server for the mysql user 'root'@'localhost' or you will not authenticate. You also need to remember that if your .php page is on a different machine, it is not connecting to the same mysqld that you have running in your development machine (your personal environment). Your .PHP page is trying to connect to the one running on its host machine. That user 'root' may have an entirely different password. Your programs are connecting fine. If they didn't you would get a different message. They are failing to authenticate which means that the mysqld they are connecting to does not recognize the password you are using for the account you are trying to authenticate as. Regards, -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
WTF - we are talking about *database connections* and *not* http-URL's the webserver is only the *messenger* Am 13.01.2014 18:54, schrieb Érico: using both urls I get the same error : http://localhost/mysql/index.php http://127.0.0.1/mysql/index.php in 127.0.0.1... after I submit the index.php ... it redirects to localhost too .. 2014/1/13 Reindl Harald h.rei...@thelounge.net 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@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP signature.asc Description: OpenPGP digital signature
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
*your application* is connecting to mysql *your application* is using a hostname *your application* *may* use 127.0.0.1 *your application* should use localhost to *connect to the databse* *your application* can only use TCP *if there is* a *mysql user* with *that host* http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html Am 13.01.2014 20:38, schrieb Érico: no connections outside command line are being accepted . I have connected through command line , but not using eclipse for example ... it gets the same error from the web app my apache and pages are in the same computer that mysql I am not getting password issues.. otherwise I would not connect through command line 2014/1/13 shawn l.green shawn.l.gr...@oracle.com On 1/13/2014 1:49 PM, Érico wrote: Hi didn't work look ... isn't this something related to this : are you using localhost or 127.0.0.1 in the web-application root@localhost != root@127.0.0.1 = different users localhost: Unix-Socket 127.0.0.1: TCP ... since I am not able to stabilsh a connection even with using eclipse ... my /etc/hosts file : ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local #127.0.0.1 mysqld The thing to remember is that 'localhost' or '127.0.0.1' is where the server believes the connection is coming from. The password you must be using in your client connection attempt must match the one used on the server for the mysql user 'root'@'localhost' or you will not authenticate. You also need to remember that if your .php page is on a different machine, it is not connecting to the same mysqld that you have running in your development machine (your personal environment). Your .PHP page is trying to connect to the one running on its host machine. That user 'root' may have an entirely different password. Your programs are connecting fine. If they didn't you would get a different message. They are failing to authenticate which means that the mysqld they are connecting to does not recognize the password you are using for the account you are trying to authenticate as. signature.asc Description: OpenPGP digital signature
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Hello Reindl, On 1/13/2014 3:01 PM, Reindl Harald wrote: *your application* is connecting to mysql *your application* is using a hostname *your application* *may* use 127.0.0.1 *your application* should use localhost to *connect to the databse* *your application* can only use TCP *if there is* a *mysql user* with *that host* http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html ... snip ... The problem is, his other clients (his php page,his eclipse environment) is where he has problems making the connection from. His direct connection (using the mysql command line client) is having no problems. So, the issues are: * Why is a client connection, from the same host as the mysqld server, initiated from his PHP code failing to connect? * Why is a client connection, from the same host machine as his mysqld server, initiated from his Eclipse programming tool failing to connect? We are not saying he is using HTTP commands to log into his database. We have clarified that both his client and his server are on the same host. My last advice is that the password he is providing through his other clients must be incorrect. I even suggested that he may be validating his account on one instance but his tools are attempting to connect to a different instance. And whether I say mysql -u root -h localhost (via Unix socket) or I say mysql -u root -h 127.0.0.1 (via TCP socket) they may /both/ be reported as 'localhost' in the error message because of how the reverse DNS lookup happens during the user authentication process and the contents of his local /etc/hosts file. http://dev.mysql.com/doc/refman/5.6/en/connection-access.html Does that give you a better image of the current problem? -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: Access denied for user 'root'@'localhost' (using password:
YES) on mysql admin MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol=application/pgp-signature; boundary=wmcsLTXQx7E3jAVxUD1b39Xfw2SDoi7cu --wmcsLTXQx7E3jAVxUD1b39Xfw2SDoi7cu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Please provide the output of the below query. Select user, host, password from mysql.user; Thanks Vikas Shukla Mail Sent from my Windows Phone From: Reindl Harald Sent: =E2=80=8E14-=E2=80=8E01-=E2=80=8E2014 01:38 To: mysql@lists.mysql.com Subject: Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin *your application* is connecting to mysql *your application* is using a hostname *your application* *may* use 127.0.0.1 *your application* should use localhost to *connect to the databse* *your application* can only use TCP *if there is* a *mysql user* with *that= host* http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html Am 13.01.2014 20:38, schrieb =C3=89rico: no connections outside command line are being accepted . I have connected through command line , but not using eclipse for example ... it gets the same error from the web app =20 my apache and pages are in the same computer that mysql =20 I am not getting password issues.. otherwise I would not connect through command line =20 2014/1/13 shawn l.green shawn.l.gr...@oracle.com =20 On 1/13/2014 1:49 PM, =C3=89rico wrote: Hi didn't work look ... isn't this something related to this : are you using localhost or 127.0.0.1 in the web-application root@localhost !=3D root@127.0.0.1 =3D different users localhost: Unix-Socket 127.0.0.1: TCP ... since I am not able to stabilsh a connection even with using eclipse ..= . my /etc/hosts file : ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0localhost 127.0.0.1 ericomtxmacbookpro.local #127.0.0.1 mysqld The thing to remember is that 'localhost' or '127.0.0.1' is where the server believes the connection is coming from. The password you must be using in your client connection attempt must match the one used on the server for the mysql user 'root'@'localhost' or you will not authenticat= e. You also need to remember that if your .php page is on a different machine, it is not connecting to the same mysqld that you have running i= n your development machine (your personal environment). Your .PHP page is trying to connect to the one running on its host machine. That user 'roo= t' may have an entirely different password. Your programs are connecting fine. If they didn't you would get a different message. They are failing to authenticate which means that the mysqld they are connecting to does not recognize the password you are us= ing for the account you are trying to authenticate as. --wmcsLTXQx7E3jAVxUD1b39Xfw2SDoi7cu-- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Access denied for user 'root'@'localhost' (using password: YES) on mysql admin
Am 13.01.2014 21:47, schrieb shawn l.green: Hello Reindl, We are not saying he is using HTTP commands to log into his database we excludes obviously the OP or his overall understanding :-) Am 13.01.2014 18:54, schrieb Érico: using both urls I get the same error : http://localhost/mysql/index.php http://127.0.0.1/mysql/index.php in 127.0.0.1... after I submit the index.php ... it redirects to localhost too .. signature.asc Description: OpenPGP digital signature