D
D
denis_213213212020-08-17 09:17:51
Laravel
denis_21321321, 2020-08-17 09:17:51

How to properly connect a database on Laravel to hosting (Fozzy)?

Connected to the server via SSH.
Created a user for the database on the hosting
5f3a1f778a247088735779.png

. Entered the name of the database, login into the .env file. password.
.env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=denislu1_bd_32
DB_USERNAME=denislu1_user
DB_PASSWORD=*******

But when migrating, I get an error (Access denied)
Illuminate\Database\QueryException

  SQLSTATE[28000] [1045] Access denied for user 'denislu1_user'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = denislu1_bd_32 and table_name = migrations and table_type = 'BASE TABLE')


What could be the problem, or am I missing something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-08-17
@Sanes

Specify the host address. It may not be localhost.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question