title: Connecting online database with my laravel project
body: <p>I bulit the website using laravel 5.4 and, I have uploaded it my website on a shared hosting (aruba.it), now I am facing an issue which  I believe in my database connection(connect the database with the laravel project in .env file ) and i get the following error </p>
  
  <pre><code>QueryException in Connection.php line 647:
  SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `galleries`)
  </code></pre>
  
  <p>My .env file is </p>
  
  <pre><code>APP_NAME=Laravel
  APP_ENV=production
  APP_KEY=base64:/9SmuKSXz43JnO3QZP9rv2jp91xTuVornyzBvsRZDuE=
  APP_DEBUG=false
  APP_LOG_LEVEL=debug
  APP_URL=http://www.petronius1926.com/
  
  DB_CONNECTION=mysql
  DB_HOST= myhost
  DB_PORT=3306
  DB_DATABASE=databasename
  DB_USERNAME=username
  DB_PASSWORD=password
  
  BROADCAST_DRIVER=log
  CACHE_DRIVER=file
  SESSION_DRIVER=file
  QUEUE_DRIVER=sync
  
  REDIS_HOST=127.0.0.1
  REDIS_PASSWORD=null
  REDIS_PORT=6379
  
  MAIL_DRIVER=smtp
  MAIL_HOST=smtp.mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=null
  MAIL_PASSWORD=null
  MAIL_ENCRYPTION=null
  
  PUSHER_APP_ID=
  PUSHER_APP_KEY=
  PUSHER_APP_SECRET=
  </code></pre>
  
  <p>Thank you in advance for the help 
  PS I checked a lot of old posts and i couldn't find a solution </p>