Can anyone tell me how to configure MySql to allow host based remote access ? I know there is an option to configure this on hosts with Cpanel but I need to do it on a host that does not have a control panel. Yes I have root access.... I can't seem to find this in the MySql manual either.....Is there a simple way to do this in a file somewhere? Thanks in advance!
You need to use the GRANT syntax. Basically something like: GRANT ALL ON *.mydb to 'myuser'@'myhost' IDENTIFIED BY 'my_password'; You probably don't want to use GRANT all but more like GRANT select, insert, update, delete. Check the mysql website for the permissions you want to grant in case you aren't sure. http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
Ok in the above......I am confused as to what to put 'myuser'@'myhost' as. Here is why........ Lets say the database is on host foo.com and the mysql user is is "goober" Now I want to access the db on foo.com from Bar.org but bar.org has no user named "goober" do I still say this: ?
Yes. You would use: GRANT ALL ON *.mydb to 'goober'@'bar.org' IDENTIFIED BY 'goober_password'; The you would use goober and goober_password on the remote server to access foo.com. If the site you are accessing from has a dedicated IP, you can also use that instead of a hostname. The IP is generally faster as well because the server doesn't need to make a hostname lookup. You would use: GRANT ALL ON *.mydb to 'goober'@'som.e.ip.addr' IDENTIFIED BY 'goober_password';