0

How would I go about doing this (the title is the question), I've changed all my ENV files to my hosted mysql details. When i run php artisan migrate from composer I get the

"denied username@localhost using password yes error".

I've changed the port and everything but I'm not sure what to do anymore and I'm 99% sure that the details are correct I've tried them multiple times

7
  • Are your files local and do you want them to connect to a remote database? If then, does your remote database have a remote access enabled config? Commented Jul 29, 2016 at 12:56
  • did you change your database.php details? Commented Jul 29, 2016 at 12:57
  • My files are corrently local do i need to upload them to the server first before running migrate..? please tell me its that simple Commented Jul 29, 2016 at 12:57
  • @PardeepPathania you dont need to as long as the ENV files are changed it uses the ENV files over the other values in database.php Commented Jul 29, 2016 at 12:58
  • @KenziieeFlavius i know that but you have to change the details as well, so try to change it. Commented Jul 29, 2016 at 12:59

1 Answer 1

1

You need check somethings:

  • are credentials valid (username, password and host)?
  • the database host is accessible by your application server?
  • .env file is correctly configured or have some config hard coded in app/config/database.php?

To validade connection, you can try this: http://www.w3schools.com/php/php_mysql_connect.asp

About configuration and enviroments : https://laravel.com/docs/5.2/configuration

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for this i love how detailed the answers are people give on this site keep up the good work! I figured out the answer to my question though

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.