I have project on my local computer. I want to test my db online on 000webhost. I set .env file like this
and I had error like this
thanks before
If your database is hosted on an external server / hosting service (e.g. 000webhost
) then your database DB_HOST
in .env
won't be "localhost", it would be something like this:
mysql#.000webhost.com
Where the #
is number of the allocated database server for your site.
Typically, when you create a new database, they show the database access details, use those details.