A
A
Andrew2016-10-14 17:46:16
linux
Andrew, 2016-10-14 17:46:16

How to connect to mysql as root without a password?

Such a problem, put in parts apache, php, mysql, phpmyadmin. Now I'm setting everything up. I'm not going to release the server outside, so I want to connect to the database without a password (that is, go to PMA, through the console, connect sites ...). The problem is that he refuses to log in at all through root, the user has one, shows that he does not have a password joxi.ru/52aQNZoiGME7E2 , but still does not let him through PMA or through the console ... Shows the error "ERROR 1045 (28000 ): Access denied for user 'root'@'localhost' (using password: NO)"
MySQL version 5.7

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey, 2016-10-14
@ntzch

I made it easier, rearranged the mysql server (because I finally broke everything there) with a given password for root, then just changed the password to an empty one and it worked.

D
Dmitry, 2016-10-14
@slo_nik

Good evening.
Well, assign the simplest password for access and do not rack your brains.

A
Andrey Burov, 2016-10-14
@BuriK666

add root with host "localhost"
localhost in this case it's a unix-socket connection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question