In MySql you can specify users as 'username@host'. Make sure that all users have the hostname set to 'localhost'. You can also block the port used by MySql, allowing connections from localhost only, and if you are so concerned about security, changing the port number of MySql seems to be a good idea, too!