Fix ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address' (111)
Problem :
Continuing from previous tutorial on how to fix access denied to root connecting remotely error 1045. This time is another error message that was caused by default MariaDB/MySQL server setting.
ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address' (111)
Solution :
The default setting of MariaDB/MySQL server will not allow access with mysql
tool from remote machine. Check the MariaDB/MySQL server's configuration file
either /etc/my.cnf
or /etc/mysql/my.cnf
to see if there is a bind-address
parameter in there. For example,
bind-address = 127.0.0.1
If there is a bind-address
parameter in my.cnf
file, this instruct the server to accept mysql
tool connection from localhost or 127.0.01.
To change and allow remote access, you can either remove the bind-address
parameter or comment it out.
Remember to restart MariaDB/MySQL for the changes to take effect.
>sudo /etc/init.d/mysql restart
Shutting down MySQL. SUCCESS!
Starting MySQL.. SUCCESS!
Hope this helps!
See also : Fix ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES)
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.3k Golang : How to write backslash in string?
+7.9k Golang : Mapping Iban to Dunging alphabets
+10.8k Golang : Interfacing with PayPal's IPN(Instant Payment Notification) example
+7.5k Golang : How to convert strange string to JSON with json.MarshalIndent
+5.1k Python : Convert(cast) bytes to string example
+12.7k Golang : Arithmetic operation with numerical slices or arrays example
+14.3k Golang : Convert IP version 6 address to integer or decimal number
+20.4k Golang : Compare floating-point numbers
+5.5k Python : Delay with time.sleep() function example
+12.9k Swift : Convert (cast) Int or int32 value to CGFloat
+8.6k Golang : Generate Datamatrix barcode
+13.3k Golang : Skip blank/empty lines in CSV file and trim whitespaces example