Mysql Error Code 1045 Sqlstate 28000 Access Denied For User
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES) up vote 240 down vote favorite 118 First let me mention that I've gone through many suggested questions and found no relevent answer. Here is what I'm doing. I'm connected to my Amazon EC2 instance. I can login with MySQL root with this command: mysql -u root -p Then I created a new user bill with host % CREATE USER 'bill'@'%' IDENTIFIED BY 'passpass'; Granted all the privileges to user bill: grant all privileges on *.* to 'bill'@'%' with grant option; Then I exit from root user and try to login with bill: mysql -u bill -p entered the correct password and got this error: ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES) mysql access-denied share|improve this question edited Sep 6 at 17:44 Jaap 1,2101431 asked Apr 24 '12 at 13:42 Ali 1,88081738 14 Did you FLUSH PRIVILEGES? –eggyal Apr 24 '12 at 14:10 1 Nope. Let me try that –Ali Apr 24 '12 at 14:15 1 Okay, I tried this without any success. Any other suggestion please. –Ali Apr 25 '12 at 4:35 1 What version of the server are you running? I've seen 5.1 behave oddly about this. –Poodlehat Jun 27 '12 at 14:27 1 This happened to me while installing Magento and I made a much sillier mistake. Putting 'mysql -
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Yes, Another http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw MySql: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) up vote 2 down vote favorite So I'm not sure what caused this to scramble my MySql password (upgrade to Mountain Lion, reinstalling ruby/rails (other issues), or simply just bad luck) but here we are: Logging in to mysql is fine, but I can't log into the root Ayman$ mysql Welcome to http://stackoverflow.com/questions/12085022/yes-another-mysql-error-1045-28000-access-denied-for-user-rootlocalhost the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 96 Server version: 5.5.25 MySQL Community Server (GPL) Copyright (c) 2000, 2011, 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. When I try to login to root: Ayman$ mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Looked at the users: mysql> CREATE USER root@localhost IDENTIFIED BY 'out22out'; ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation mysql> SELECT USER(),CURRENT_USER(); +-----------------+----------------+ | USER() | CURRENT_USER() | +-----------------+----------------+ | Ayman@localhost | @localhost | +-----------------+----------------+ 1 row in set (0.00 sec) mysql> SELECT USER, HOST FROM mysql.user; ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user' mysql> select user, host from mysql.user; ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user' mysql> grant all on *.* to Ayman@'%'; ERROR 1045 (28000): Access
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this http://stackoverflow.com/questions/19989418/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-n site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR mysql error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) up vote 7 down vote favorite 3 I lost the access onto MySQL v. 5.6.14. I had access and suddenly I lost it. Looking for notes I found out the url below. I did the steps, but not success. http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html C:\Program Files\MySQL\bin>mysqld 2013-11-14 19:46:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please mysql error code use --explicit_defaults_for_timestamp server option (see documentation for more details) C:\Program Files\MySQL\bin>mysql -u root mysql1 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Notice: I don't have mysqld_safe or safe_mysqld files in MySQL version Could you please help me? Below you can see the dump file generated by the command: C:\mysqld --init-file=C:\\mysql-init.txt C:\Program Files\MySQL\bin>mysqld --init-file=C:\\mysql-init.txt --console 2013-11-14 17:57:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2013-11-14 17:57:20 5180 [Note] Plugin 'FEDERATED' is disabled. 2013-11-14 17:57:20 5180 [Note] InnoDB: The InnoDB memory heap is disabled 2013-11-14 17:57:20 5180 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2013-11-14 17:57:20 5180 [Note] InnoDB: Compressed tables use zlib 1.2.3 2013-11-14 17:57:20 5180 [Note] InnoDB: Not using CPU crc32 instructions 2013-11-14 17:57:20 5180 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2013-11-14 17:57:20 5180 [Note] InnoDB: Completed initialization of buffer pool 2013-11-14 17:57:20 5180 [ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode 2013-11-14 17:57:20 5180 [ERROR] InnoDB: The system tablespace must be writable! 2013-11-14 17:57:20 5180 [ERROR] Plugin 'InnoDB' init function returned error. 2013-11-14 17:57:20 5180 [ERROR] Plug