Originally posted by fabiuz
... I am already using localhost to use db but I need to connect from remote hosts too...
whats the remote host? If im getting you right, all you have to do is add a new mysql user to access from the remote host, which isnt hard...
Use the same user you have added to access from the local host and do this...
Login to mySQL as root, then type the following exactly changing <MYSQLUSER> with the user name of your choosing and make_a_pass (keep the ' around the password)...
GRANT ALL PRIVILEGES ON . TO <MYSQLUSER>@"%" IDENTIFIED BY 'make_a_pass' WITH GRANT OPTION;
This will allow the user you specified (<MYSQLUSER>) to login and access your mysql database (with password make_a_pass) from any remote host.
From there, youd just put <MYSQLUSER> in the dbuser section of your php mysql connect statement or in the phpmyadmin config. Make sure you put your server IP/hostname in the host 🙂