Skip navigation links

MySQL Forums :: PHP :: #1130 - Host 'localhost' is not allowed to connect to this MySQL server


Advanced Search

Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server
Posted by: jink ()
Date: January 11, 2007 03:51PM

mysql documentation and specifically, "5.8. The MySQL Access Privilege System" section contains the information on how to do this.

mysql basically authentics users based on host & userid. hence, if a particular user is not specified in the mysql.user table to be connecting from a specific host, then the connection request (be it odbc, mysql, etc) will be rejected.

hence, the solution is to add an entry (or entries) for all accesses ( host & user combination). if there is a need to have user "root" access the db from "host1.com", "host2.com", and "host3.com"... then there must be 3 entries or an entry with matching pattern.

e.g.
select host, user from mysql.user

+-----------+------+
| host | user |
+-----------+------+
| host1.com | root |
| host2.com | root |
| host3.com | root |
+-----------+------+

or

+-----------+------+
| host | user |
+-----------+------+
| host% | root |
+-----------+------+

please note that you need to use the ID or the name which is being used for the host name when mysql connection is requested.

"ERROR 1130 (00000): Host 'Host1.com' is not allowed to connect to this MySQL server."

ip address is not necessarily interchangable with FQDN or host name. so use the exact NAME which is displayed with the error.

additionally after the change (modifying the mysql.user table) you MUST shutdown/restart the mysql server or using mysqladmin.exe do "reload" to update the necessary system tables.

-jin

Options: ReplyQuote


Subject Written By Posted
#1130 - Host 'localhost' is not allowed to connect to this MySQL server Loussot thierry 03/17/2005 12:43PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server mysql 04/21/2005 10:44AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Mike Smith 04/22/2005 08:40AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Kashif Aziz 04/29/2005 06:43AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Murilo Pessoa de Oliveira 04/30/2005 05:29PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server chris chupp 05/02/2005 03:11PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server drealcoder 09/04/2006 08:38AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Arthur Hansen 09/17/2006 01:18PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Aurelio Alvarez 03/22/2007 08:15PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server jean-Claude Hasson 05/12/2009 11:27AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Colin Stewart 06/16/2007 03:34PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Mahmoud Taghavi 11/28/2005 10:39PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server James DOdd 05/05/2005 04:32AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Rudok Simintiv 05/18/2005 11:51AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server venkat n 05/20/2005 10:11PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Meesum Raza 04/23/2008 03:56AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server hellen henry 07/23/2008 12:29AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Dave Pullin 10/26/2005 10:48AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server skip paul 12/02/2005 03:22PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server jink 01/11/2007 03:51PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server ajay sharma 04/11/2007 06:46AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Jan Brink 05/25/2007 07:41AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server N BD 11/14/2007 09:56AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Kamalakkannan Manivannan 06/14/2007 04:24AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Imran Nazir 06/28/2007 12:00AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server eric pitcher 10/09/2007 08:40PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Black Sushi 10/24/2007 03:11PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Stefan Kirn 11/23/2007 04:53AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Boris Gnarf 11/23/2007 02:19PM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Jan Pihlgren 11/24/2007 07:31AM
Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server Lucian Rusu 11/26/2007 03:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.