Hi all, In this section i want to share about PHP and Mysql server if they are located at different host. Do you have php server? Do you have mysql server? Where are they located? I think there is no anything to configure if you have PHP and mysql server in same host. Try to to separate them! See what happened! I think you couldn’t to access mysql server in your PHP server. If you are able to access mysql server, then you are on the correct setting and vice versa.

Below is the correct setting :

Configure through PhpMyadmin

  1. Open your PhpMyadmin.
  2. Go to Privilages tab.
  3. Click edit privilages on the user that you want to use.
  4. Choose any host at the host combo box.
  5. Click go to save it.

Configure through mysql command:

  1. Login to your mysql.
  2. And then run the script below:

CREATE USER 'root'@'%';

GRANT ALL PRIVILEGES ON * . * TO 'root'@'%' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

Done! Try to access it!