try
php artisan config:cache
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys, i'm having a problem trying to execute for the first time the php artisan migrate on my dreamhost shared server.
I have everything set up (git, composer, artisan) on my server, via SSH. I've created a DB with this information on the dreamhost panel (not the actual data, of course, but similar):
- Hostname for the MySQL DB:
db.some_hostname.com
- Databases on this server
some_hostname_database
- Database user
db_user
And, in my server's .env file, i have this:
DB_CONNECTION=mysql
DB_HOST=db.some_hostname.com
DB_PORT=3306
DB_DATABASE=some_hostname_database
DB_USERNAME=db_user
DB_PASSWORD=somepassword
I even access the DB with 3rd party software via SSH tunneling
But when i run php artisan migrate, i get this error:
SQLSTATE[HY000] [1045] Access denied for user 'db_user'@'baron-zemo.dreamhost.com' (using password: YES) (Connection: mysql, SQL: select * from information_schema.tables where table_schema = some_hostname_database and table_name = migrations and table_type = 'BASE TABLE')
What is killing me, is why it is using @'baron-zemo.dreamhost.com', if i specified another hostname both on the dreamhost server, as well as in the .env file.
Any thoughts? Thanks in advanced
Please or to participate in this conversation.