-1

I've a little problem with my laragon mysql server. I'm trying to connect phpmyadmin panel but I have this error code

Error Code

 mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

and I've got another weird error codes like in picture

enter image description here

Root folder is working perfectly and my site working good. Bu I can't connect phpmyadmin. So what shall I do?

Dharman
  • 30,962
  • 25
  • 85
  • 135

1 Answers1

1

The red error in your screenshot, that you also mentioned in your error code, is the real problem. The blueish messages are just deprecation notices which won't affect the behavior of your system.

The message Access denied for user 'root'@'localhost' (using password: NO) is very speaking already. You try to connect to your database as root user without a password, which your database does not allow.

So, you have a few options:

  1. Create and configure a root password. You can find a laragon-specific walkthrough here.

  2. Even better, if suitable for you: Create a specific user (not root) and password for your application and use this one.

  3. Make your database allow password-less root connections. See here for how this can be achieved. Note: Mostly, this is a serious security issue. Please be sure to know, what you are doing and never do something like this in productive / internet accessible systems!

ahuemmer
  • 1,653
  • 9
  • 22
  • 29