Mysql Error Number 1045 Remote
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss mysql remote access denied for user using password yes the workings and policies of this site About Us Learn more about mysql remote access denied for user root Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions mysql windows allow remote connections 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.
Error 1045 28000 Access Denied For User Using Password Yes
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 mysql access denied for user using password yes 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 installi
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 mysql allow remote connections from any host Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Mysql Access Denied For User 'root'@'localhost' (using Password Yes)
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just
Mysql Access Denied For User Using Password No
like you, helping each other. Join them; it only takes a minute: Sign up MySQL Error 1045 Access Denied up vote 1 down vote favorite 1 Good Morning, I wrote the code block below on my local http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw Windows 7 PC and tried to run it. Unfortunately, I received: Connect Error (1045) Access denied for user 'dbuser'@'myhost(using password: YES) I have granted dbuser Insert, Select, Update, and Execute using both localhost and % for this database schema. I am able to mysql -u dbuser -p from command line on server as well. Here's the code block: http://stackoverflow.com/questions/3532868/mysql-error-1045-access-denied (mysqli_connect_error()){ die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); echo 'Success... ' . $mysqli->host_info . "\n"; $mysqli->close(); } ?> I'm having difficulty understanding whether the above code block is causing my error, or whether there's something required to be done on the server. Can anyone suggest some areas of investigation? Thanks, Sid php mysql mysql-error-1045 share|improve this question edited Aug 20 '10 at 16:33 OMG Ponies 199k37360417 asked Aug 20 '10 at 16:30 SidC 1,44384295 Doublechecked host? –Eton B. Aug 20 '10 at 16:33 Yes. I reset dbuser password, to no avail. Would it be better to use the server name in my $host variable instead of an IP Address? –SidC Aug 20 '10 at 16:49 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted Make sure that if you're using a hostname for the GRANT in MySQL, that MySQL can properly resolve that hostname to the IP you're connecting from. For instance, if you do GRANT blah ON *.* to user@somehost you have to remember that MySQL won't see 'somehost', it'll see an IP address. It'll have to do a reverse lookup to get a hostname, and if the IP either doesn't have a reverse mapping, or maps to something completely different, MySQL won't give access. Unless you can gua
denied for user ‘root'@'remote-admin.com' (using password: YES) I recently migrated MySQL database server from host A to host B (remotesystemadministration.com), because I wanted to have the mysql database server on a separate machine (have separation of server running services and have a dedicated mysql server). MySQL server host (running on localhost previously was set from my mysql config - my.cnf to listen and serve connections on localhost with bind-address = 127.0.0.1 ). MySQL is used by a Tomcat running Java application on localhost and my task was to set the Tomcat to use the MySQL database remotely to MySQL host B (new remote hostname where MySQL is moved is remotesystemadminsitration.com and is running on IP 83.228.93.76). Migration from MySQL Db server 1 (host A) to MySQL Db server 2 (host B) is done by binary copying the mysql database directory which in this case is (as it is a Debian server installed MySQL), the standard directory where mysql stores its database data is /var/lib/mysql ( datadir = /var/lib/mysql in /etc/mysql/my.cnf) Binary copying of data from MySQL db (host A) to MySQL Db (host B) is done with rsync After migrating and trying to login on migrated mysql database on remotesystemadministration.net with mysql cli client: remotesysadmin:~$ mysql -u root -p I got following error: ERROR 1045 (28000): Access denied for user 'root'@'remotesystemadministration.com' (using password: YES) To fix the issue I had to login remotely from old migration server mysql (host A) cli: mysql:~$ mysql -u root -p -h remotesystemadministration.com and run SQL commands: GRANT ALL PRIVILEGES ON *.* TO 'root'@'remotesystemadministration.com' WITH GRANT OPTION;
GRANT USAGE ON *.* TO 'root'@'remotesystemadministration.com' IDENTIFIED BY 'secret-mysql-pass';
FLUSH PRIVILEGES; Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Another way to solve the problem is to add the root user to be able to connect from any host (Enable MySQL root access from all host), to do so issue: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES; Note: In newer version of MySQL, flush privileges could be omitted. Another approach if you want to substitute access from loca