B
B
Barney_Gubmle2018-12-10 14:55:14
linux
Barney_Gubmle, 2018-12-10 14:55:14

How to "make friends" laravel with mysql?

Good day. Faced the following kind of problem.
There is a database, in the console it is:

+--------------------+
| Database           |
+--------------------+
| information_schema |
| forge              |
| mysql              |
| performance_schema |
| phpmyadmin         |
| sys                |
+--------------------+

the required database is forge
, but I can’t connect to it through dbreaver.
After I connected laravel, its address became: 127.0.0.1:8000
in dbreaver I drive in
the address: 127.0.0.1
port: 8000
forge database
User: root
password no
AI ...and nothing happens, just a long connection. I so suspect that it is connected to a DB not there.
tried to just connect to localhost with standard port, it gives error "Access denied for user 'root'@'localhost'"
What am I doing wrong?
Linux Mint

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2018-12-10
@Barney_Gubmle

The port is standard. You probably do not have a [email protected] user, and you can only connect as root via a socket, which is what the console client does by default. Naturally, for a web application, there is no need to connect under root, so you need to do one of two things:
-Create a user with rights to this database and @127.0.0.1, and connect via 127.0.0.1:3306.
-Create a user with rights to this database, @localhostand connect via socket.
Well, mysql [email protected] assign a password if it is really empty.

R
riot26, 2018-12-10
@riot26

Under muscle root, you can only log in from Linux root. Just create a new user and give him the right permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question