Database Migration

Hi,

I have moved the mysql database to remote server. I have confirmed that the connection details work by using mysql -u ninja -p -h SERVER_ADDRESS and it connects successfully. I updated the .env file, restarted the server but invoice ninja goes to the setup page when I try login.

The setup page give the following error:
SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘16#.#1.#5.#27’ (using password: YES)

16#.#1.#5.#27 is the IP address of local host. It seems the server address in .env file is being completely ignored. What am I missing?

Version ie <v5.10.30>

Environment <Docker/Shared Hosting/Zip/Other>

Checklist

Describe the bug

Steps To Reproduce

Expected Behavior

Additional context

Screenshots

Logs

Hi,

I suggest using php artisan tinker to check the values of the .env file using config('database.connections.mysql.host')

Thanks for the tip. I used tinker to go through all the mysql paramaters. Turns out the password was incorrect because the password from the user at the remote server has a ‘#’ character in it so it was sending an incorrect password.

I had it changed to alphanumeric and that solved the problem.

Thanks!!!

1 Like

Glad to hear it, thanks for the update!