Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - offzinho

Pages: [1]
1
MySQL / MySQL Connection refused
« on: January 06, 2019, 09:15:33 PM »
I had a problem with power failure on my vps, and when the energy comes back, I no longer have access to mysql.
Introducing the following error in the CWP login page.
Code: [Select]
Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

I tried to find some solution by google and looking at some topics here in the forum.
But I did not succeed, Then I removed mysql and mariadb from the server and reinstalled.

But when I go to configure the same error appears.
Code: [Select]
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")


If someone can give me a light, I would be grateful.

Pages: [1]