2

I am on linux and I have never installed a database management system but when I type in the terminal mysql --version I get mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2.

I can connect to the database without a password when I type mysql without any password.

Meanwhile, I installed Adminer and I would like to use it alternatively phpmyadmin to manage my database but I can not connect myself I receive the following error in my browser Access denied for user 'root' @ 'localhost'.

I try all the methods found on google google to create a root password but I can not.

I tried the solutions proposed here:

And many oder link.

How can I set a root password for mysql to use it in Adminer

Carlos Cavero
  • 2,768
  • 5
  • 18
  • 34
  • Can you try to connect from the console using `mysql -u root -p` and then enter the configured password? If that works the configuration for Adminer is wrong. If that doesn't work, you need to show us the exact commands you've tried – JensV May 03 '19 at 13:43
  • I have already tried and I arrive so connected to me no matter what password I enter –  May 03 '19 at 13:48
  • Can you try this not using the root user on the machine? As that is probably what is bypassing the authentication – JensV May 03 '19 at 13:50
  • and which user should I use? –  May 03 '19 at 13:52
  • Any user which isn't root – JensV May 03 '19 at 13:57

1 Answers1

4

If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To set up a root password for the first time, use the mysqladmin command at the shell prompt as follows:

mysqladmin -u root password newpass