• Support
  • How To Resolve db: 'unconnected' user: 'root' host: 'localhost'

Hello, I am having trouble with the database that suddenly error establishing. related to the log as shown in the image below:

or you could say get a warning like this:

[Warning] Aborted connection 37 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets)

Previously it was normal. But then it became like that so that when I access the WordPress website I can't or a warning like this appears:

for details of the VPS I am using:

System: Ubuntu 22.04.5 LTS x86_64(Py3.12.3)
Database: MySQL MariaDB 11.4.4

Please provide instructions and assistance regarding the problem I am experiencing.

Thank you,

    Hello, is the problem solved? Can I use this website database user or password to log in to Phpmyadmin?

    SobatWP

      4 days later

      aaPanel_Kern still can't do that. However, after the host was changed to 127.0.0.1 from the original localhost, it can be used and is back to normal.

      Does it have to be like that or is there a way to use localhost without having to change it to 127.0.0.1?

      Thank you

        Hello, have you modified the PHP configuration? What is your web service?

        SobatWP

          aaPanel_Kern

          for now the configuration that I do in php 7.4 is like this:

          and for the web service that I use is OpenLiteSpeed.

          Thanks

          Hello, it should be the incorrect default_socket related to PHP configuration.
          Please check whether it is /tmp/mysql.sock

          Thank you for your response, for now I try to do your command related to checking /tmp/mysql.sock.

          but when checked, the result is like this:

            Hello, you should check in the configuration of PHP

            SobatWP