Archive for the ‘MySQL’ category

MySQL – Allow connections from other IP or local network

March 11th, 2010

To allow a connection to a MySQL db for a user from another source then localhost you would need to run the following:

GRANT ALL PRIVILEGES ON databasename TO username@''
 IDENTIFIED BY 'password';

Replace the required information with what you need( ie databasename, username, ip and password) but this will grant access to the db from that IP.

It is possible to use a wildcard for the IP OR domain ( can be or etc…). The wildcard is %. So the combination would be

192.168.1.% or 192.168.%.%

for a domain it is or %.sogoth.% etc....

Once added you then need to run:


This will allow the new user to connect to the proper DB.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d