Mysql Error 1045 Yes
Contents |
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 error 1045 (28000): access denied for user (using password: no) about Stack Overflow the company Business Learn more about hiring developers or posting
Error 1045 Sqlstate 28000 Access Denied For User 'root'@'localhost'
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Mysql Access Denied For User Using Password Yes
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:
Mysql Drop Anonymous User
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 mysql access denied for user root 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 -u magento -p magento' was prompting me for a password and instead of the default password I was putting the root password in. –AmirHd Oct 29 '13 at 3:26 | show 4 more comments 26 Answers 26 active oldest votes up vote 282 down vote accepted You probably have an
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 #1045 access denied for user localhost using password yes about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges mysql access denied for user using password no Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each 1045 - access denied for user 000webhost other. Join them; it only takes a minute: Sign up ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES) up vote 3 down vote favorite 2 I Installed MySQL on my CentOS 6.4 server. I logged into http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw my root and changed its password. Later I thought that I should make a new user and use that user as my default user, So I created a new user name golden using the following command: CREATE USER 'golden'@'%' IDENTIFIED BY 'password'; Then I applied permission to the user golden: GRANT ALL PRIVILEGES ON * . * TO 'golden'@'%'; FLUSH PRIVILEGES; Now this user: golden was able to do everything. So I finally Deleted the root user. http://stackoverflow.com/questions/19220085/error-1045-28000-access-denied-for-user-username-using-password-yes Now I am stuck up on granting privilege to my one another new user. I created another user, when I was logged in through golden (At this time I had already deleted the root user and command successfully created and the new user I am able to see it in list also) CREATE USER 'fashion'@'%' IDENTIFIED BY 'password'; Then the following commands below gives me error: GRANT ALL PRIVILEGES ON *.* TO 'fashion'@'%'; ERROR: ERROR 1045 (28000): Access denied for user 'golden'@'%' (using password: YES) I also tried the following command the result is below: mysql> SELECT USER(),CURRENT_USER(); +------------------+----------------+ | USER() | CURRENT_USER() | +------------------+----------------+ | golden@localhost | golden@% | +------------------+----------------+ If I wont be able to give access to this user then how can I login and use the database? Kindly help. EDIT 1: The following command gives me the following result mysql> select user, host FROM mysql.user; +------------+-------+ | user | host | +------------+-------+ | golden | % | | fashion | % | +------------+-------+ mysql database permissions privileges grant share|improve this question edited Oct 7 '13 at 8:43 asked Oct 7 '13 at 8:26 Django Anonymous 935114084 So total how many users exist in your mysql?? –Jhanvi Oct 7 '13 at 8:27 @Jhanvi I have done an edit, kindly check –Django Anonymous Oct 7 '13 at 8:32 add a comment| 3 Answers 3 activ
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to http://dba.stackexchange.com/questions/38803/mysql-error-1045-28000-access-denied-for-user any questions you might have Meta Discuss the workings and https://linuxconfig.org/mysql-error-1045-28000-access-denied-for-user-root-solution policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and access denied answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top MySQL access denied for - ERROR 1045 (28000): Access denied for user up vote 5 down vote favorite 3 I just installed a fresh copy of Ubuntu 10.04.2 LTS on a new machine. I logged into MySQL as root: david@server1:~$ mysql -u root -p123 I created a new user called repl. I left host blank, so the new user can may have access from any location. mysql> CREATE USER 'repl' IDENTIFIED BY '123'; Query OK, 0 rows affected (0.00 sec) I checked the user table to verify the new user repl was properly created. mysql> select host, user, password from mysql.user; +-----------+------------------+-------------------------------------------+ | host | user | password | +-----------+------------------+-------------------------------------------+ | localhost | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | server1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | 127.0.0.1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | ::1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | localhost | | | | server1 | | | | localhost | debian-sys-maint | *27F00A6BAAE5070BCEF92DF91805028725C30188 | | % | re
Us MySQL ERROR 1045 (28000): Access denied for user 'root' - Solution Contents[Hide]Symptom:Solution: 1.Symptom: Unable to access MySQL database remotely using root account. Any attempt to access MySQL database will result in error: ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES) 2.Solution: The above MySQL error message is a default behavior of the MySQL server to disallow a Root user to connect remotely as by default the Root user is allowed to connect to MySQL server on from localhost that is 127.0.0.1. The solution is to create a new admin user. The below SQL commands will create new user called admin and grant remote access: mysql> CREATE USER 'admin'@'%' IDENTIFIED BY ''; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec) Alternative but not recommended solution is to grant remote MySQL access to root user: mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) The above line will grant a privilege to the root user to connect remotely: $ mysql -u root -ppassword -h 172.17.0.14 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 41 Server version: 5.5.43-0+deb8u1 (Debian) Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> Bye Please enable JavaScript to view the comments powered by Disqus. Free Linux eBooks Open Source Security Tools Linux® Quick Fix Notebook Ubuntu Linux Toolbox: 1000+ Commands Managing Linux® Systems with Webmin™ The Official Samba-3 HOWTO and Reference Guide Understanding the Linux® Virtual Memory Manager An Introduction to Design Patt