0

How do I connect my app to the remote SQL i.e.: http://database.xxx.xxx// in Laravel? I tried to set the DB_HOST to the website address in .env file, but could not make it to work.

Michele La Ferla
  • 6,775
  • 11
  • 53
  • 79
Brian Ruchiadi
  • 331
  • 1
  • 13
  • 29
  • 1
    It has nothing much to do with laravel actually. Have you actually succeeded in connecting from the machine to the remote mysql using any mysql client? – Lionel Chan Jan 16 '17 at 03:39
  • If the local machine has `mysql` command installed, try connecting to it by running in the console `mysql -h "database.xxx.xxx" -u "username" -p`. If it's on a desktop that you can run GUI application, install any mysql clients such as [sqlyog](https://github.com/webyog/sqlyog-community/wiki/Downloads) or [SequelPro](https://www.sequelpro.com/) and try out the connection. – Lionel Chan Jan 16 '17 at 03:46
  • I tried to connect locally by specifying its IP address.. But why is that it says access denied@different_IP_address.. Why is the access denied point to different IP address than the IP address that i specify? @LionelChan – Brian Ruchiadi Jan 16 '17 at 03:53
  • Enabling remote mysql access is a whole story by itself. Try googling `enable remote mysql` or something like this http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection-error-1045-28000-access-denied-for-user – Lionel Chan Jan 16 '17 at 04:08

0 Answers0