Mysql Error - Access denied for user 'root'@'localhost' (using password: YES)

Asked

Viewed 3,178 times

-2

Good morning, you guys, I really need this help, please.

File: c: wamp64 apps phpmyadmin4.9.2 config.inc.php Here is the beginning of the code:


if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
    $i++;
    if($mariaFirst) $i++;
    $cfg['Servers'][$i]['verbose'] = 'MySQL';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = $wampConf['mysqlPortUsed'];
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '123';

If I use password in root user: Access denied for user 'root'@'localhost' (using password: YES) If I do not use password in root user: Unknown database 'mydb'

I’ve uninstalled everything and reinstalled again, twice and nothing works.

Someone can help me solve this error. I’m stuck on my project for a few days, I’ve tried several explanations from the internet and no solution.

I am using version of Wampserver 3.2.0 64bit

1 answer

-1

You made the first configuration, which is wamp for Mysql. Now you need to assign the password inside Mysql. By default user root is used, no password. It’s just a hint, because I use XAMPP and it has solved me a lot. This week I started learning Docker to host on Linux, in case you want to change the technology of your project warns us to chat. Try XAMPP, it’s easier. To access Bando I use Heidi (free) instead of phpMyAdmin, and for modeling use Workbench (free from Oracle). Don’t let your project stand still because of Infra, look for other alternatives.

  • Good morning Renato, thank you for your attention. I was able to solve it, it was worth... I will leave a post here, as was the solution, by asking a question, but that part of the error was for another subject. If it is possible, I will post here an image to give more clarity on the error, I believe that many go through this, and it is something very simple, which can cause a great waste of time as was what I went through.

  • Thanks for the feedback, please describe the solution, it will definitely help someone.

  • Fixed Error: Actually it was caused not by password errors or user privileges, but by the issue of the ninth version of Wampserver 3.2.0 , where the Mariadb database was activated. If you are using Mysql, you create a new bd, with password or without password and , the error persists. Simple solution: Go to the Wampserver icon, right-click and choose: Tools/Invert default DBMS Mariadb < - > Mysql Will restart Wampserver. That fixed the bug. Inverter MariaDB para MySQL

Browser other questions tagged

You are not signed in. Login or sign up in order to post.