Mysql Connection Error 1045
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 about Stack Overflow the company Business Learn more about hiring error 1045 28000 access denied for user localhost using password yes developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Error 1045 Sqlstate 28000 Access Denied For User 'root'@'localhost'
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 mysql access denied for user using password yes 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
Mysql Access Denied For User Root
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 mysql drop anonymous user 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 anonymous user ''@'localhost' or ''@'127.0.0.1'. As per the manual: When multiple matches are possible, the server must determine which of them to use. It resolves this issue as follows: (...) When a client attempts to connect, the server looks through the rows [of table mysql.user] in sorted order. The server uses the first row that matches the client host name and
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
Mysql Access Denied For User Using Password No
Stack Overflow the company Business Learn more about hiring developers or posting ads with
Mysql Access Denied For User 'root'@'localhost' (using Password No)
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is #1045 access denied for user localhost using password yes a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Enable remote MySQL connection: ERROR 1045 (28000): Access denied for user up vote 101 http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw down vote favorite 52 MySQL 5.1.31 running on Windows XP. From the local MySQL server (192.168.233.142) I can connect as root as follows: >mysql --host=192.168.233.142 --user=root --password=redacted From a remote machine (192.168.233.163), I can see that the mysql port is open: # telnet 192.168.233.142 3306 Trying 192.168.233.142... Connected to 192.168.233.142 (192.168.233.142). But when trying to connect to mysql from the remote machine, I receive: # mysql --host=192.168.233.142 --user=root --password=redacted ERROR http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection-error-1045-28000-access-denied-for-user 1045 (28000): Access denied for user 'root'@'192.168.233.163' (using password: YES) I have only 2 entries in mysql.user: Host User Password -------------------------------------- localhost root *blahblahblah % root [same as above] What more do I need to do to enable remote access? EDIT As suggested by Paulo below, I tried replacing the mysql.user entry for % with an IP specific entry, so my user table now looks like this: Host User Password ------------------------------------------ localhost root *blahblahblah 192.168.233.163 root [same as above] I then restarted the machine, but the problem persists. mysql share|improve this question edited Jan 16 at 2:00 asked Dec 5 '11 at 3:50 Mike Chamberlain 8,7031066119 add a comment| 9 Answers 9 active oldest votes up vote 164 down vote You have to put this as root: GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD' with grant option; ; where IP is the IP you want to allow access and USERNAME is the user you use to connect If you want to allow access from any IP just put % instead of your IP and then you only have to put FLUSH PRIVILEGES; Or restart mysql server and that's it. share|improve this answer edited Aug 24 '15 at 12:12 danielad 3,26622248 answered Oct 11 '12 at 17:
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 policies of this site About Us Learn more about Stack Overflow the company Business Learn more https://www.youtube.com/watch?v=oz6BTvpn3qY 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 | | % | repl |
error #1045 - Access denied for user 'root' in phpmyadmin E Angkor SubscribeSubscribedUnsubscribe1,0401K Loading... Loading... Working... Add to Want to watch this again later? Sign in to add this video to a playlist. Sign in Share More Report Need to report the video? Sign in to report inappropriate content. Sign in Statistics 62,549 views 60 Like this video? Sign in to make your opinion count. Sign in 61 23 Don't like this video? Sign in to make your opinion count. Sign in 24 Loading... Loading... Loading... Rating is available when the video has been rented. This feature is not available right now. Please try again later. Published on Oct 17, 2015#1045 - Access denied for user 'root'@'localhost' (using password: NO or YES), if have problem like this , please try Category Education License Standard YouTube License Show more Show less Loading... Advertisement Autoplay When autoplay is enabled, a suggested video will automatically play next. Up next MySQL said: Cannot connect invalid settings error | XAMPP Phpmyadmin - Duration: 3:28. Abdel Tutors 10,159 views 3:28 How to solve mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) - Duration: 4:53. Mohammad Sheam 57,547 views 4:53 How to remove phpMyAdmin Access denied Error #1045 in wamp server - Duration: 2:46. Solution Cone 76,034 views 2:46 Erro #1045 - Access denied for user 'root'@'localhost' (using password: NO) - Duration: 9:53. Marcio Ribeiro 649 views 9:53 wamp phpMyAdmin error #1045 - Access denied for user root@locahost Fixed! - Duration: 4:56. locslikes 35,678 views 4:56 XAMPP mysql error Solved - Duration: 3:36. Solution Cone 23,736 views 3:36 How to install PHPmyadmin for 000webhost - Duration: 6:29. jozsi jozsika 16,860 views 6:29 MySQL Error number:1045 Resolved - Duration: 4:39. RGN TAMIL 74,977 views 4:39 How to fix phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection - Duration: 2:28. Jhon Smith 25,829 views 2:28 Making and hosting a free website on 000webhost - Duration: 4:29. Hacks And Security 19,213 views 4:29 SoluciĆ³n al problema acceso denegado | Phpmyadmin - Duration: 4:26. MegaCasalta 17,176 views 4:26 Connect to MySQL with PHP in XAMPP / Create a new database - Duration: 6:41. Ken Swartwout 314,860 views 6:41 xampp mysql password reset full tutorial | with phpMyadmin - Duration: 4:43. wordpress blog 10,760 views 4:43 how to solve #1045 - Access denied for user 'root'@'localhost' (using password: YES) - Duration: 2:29. A