Sample Header Ad - 728x90

Windows MySQL 5.5 Cannot connect to localhost: ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server

0 votes
1 answer
1637 views
*I can ping successfully from my Windows command line to localhost and to 127.0.0.1, but attempts to connect with mysql.exe fail...* I found similar errors but their suggested solutions don't work/apply... https://stackoverflow.com/questions/19101243/error-1130-hy000-host-is-not-allowed-to-connect-to-this-mysql-server https://dba.stackexchange.com/questions/64741/host-is-not-allowed-to-connect-to-mysql https://dba.stackexchange.com/questions/135474/host-not-allowed-connectivity-to-mysql-server I'm using a Windows 7 WAMP environment (an old Zend installation) meaning its all local (connections made from localhost/127.0.0.1). All worked fine last Friday when I did an import of a database, today, I get the cannot connect error. I did not overwrite mysql database (or at least, i am pretty sure I did not), so the error has taken me a little by surprise. C:\Backups\Daily\201607>ping /n 1 localhost Pinging Silver [::1] with 32 bytes of data: Reply from ::1: timeping /n 1 127.0.0.1 Pinging 127.0.0.1 with 32 bytes of data: Reply from 127.0.0.1: bytes=32 timemysql --user=root ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server C:\Backups\Daily\201607>mysql --user=root --host=localhost ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server My partial extract from my.ini file: [client] port=3306 # [mysqld] # The TCP/IP Port the MySQL Server will listen on port=3306 #Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files (x86)/Zend/MySQL55/" #Path to the database root datadir="C:/Program Files (x86)/Zend/MySQL55/Data/" # The default character set that will be used when a new schema or table is # created and no character set is defined character-set-server = utf8 # The default storage engine that will be used when create new tables when default-storage-engine=INNODB # Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" I'm curious on what went wrong - I suspect I'm responsible for it but lack a history file to examine the error of my ways. Can anyone advise how I can fix and reconnect?
Asked by fiprojects (435 rep)
Jul 4, 2016, 04:12 PM
Last activity: Jul 2, 2017, 07:48 PM