Hello everyone, I programmed a Laravel API. Now I would like to deploy these on my VM. Now I get the following error when I run php artisan migrate:install :
Illuminate \ Database \ QueryException: SQLSTATE [HY000] [1045] Access denied for user 'root' @ 'localhost' (using password: NO) (SQL: create table migrations
( id
int unsigned not null auto_increment primary key , migration
varchar (191) not null, batch
int not null) default character set utf8mb4 collate 'utf8mb4_u nicode_ci')
I checked my .env file. In this everything is correct. I also logged in with the data about the console in MySQL. That works.
What I also noticed now:
2 PDO :: __ construct ("mysql: host = 127.0.0.1; port = 3306; dbname = inventar", "root", "", [])
The third parameter is definitely the password. It also shows root as (presumably) user, if I specify as user laraveluser. I wonder if he really reads the env file. Or if he gets the data somewhere else. Because I have the data with which I have worked locally, uploaded via WinSCP.
I'm really desperate.
Best regards,
Helge
EDIT: My solution was pretty simple. I downloaded the application to the server via Github. Then I just had to upload the appropriate env file and the migration worked. I'm curious how it goes :).
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community