This is done under Ubuntu, but it almost the same for every version of Linux.
- Edit my.cnf File – you can find it with the locate command, usually under /etc/mysql/my.cnf.
- look for bind-address. found it? make sure this is indeed your server address on the network and not, lets say, 127.0.0.1…
- restart mysql (this is the exact command as well)
- Login to mysql from the terminal
mysql -u root -pand then your password.
- create your db using create database command, e.g.
create database test1;
- Now grant access to the user you want (this will create a user if not exists):
GRANT ALL ON test1.* TO myuser@'192.168.0.11' IDENTIFIED BY 'PASSWORD';
- if you want myuser to be able to connect from any IP, you can just type:
GRANT ALL ON test1.* TO myuser IDENTIFIED BY 'PASSWORD';and it will work.