Skip to content

MariaDB 111 “Connection refused” #657

@vikas5914

Description

@vikas5914

i was login Error establishing a database connection in my wordpress site . so i login into ssh and try to login in mariadb with username and password from wp-config.php

It gave me Connection refused error . i restart mariadb and used same login and i was able to login it .

this happen 3 time in this week . how to fix it .

PS : SSH LOG

root@reapershop:# mysql -ureapershop_com -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")
root@reapershop:
# service mysql restart

  • Stopping MariaDB database server mysqld [ OK ]
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables.
    root@reapershop:# mysql -ureapershop_com -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 44
    Server version: 10.1.8-MariaDB-1
    trusty-log mariadb.org binary distribution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions