hello!
my server migrat to other location ... and my sql server crashed with this error in cwp:
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:
how to solve this problem? It seems that innodb
Check if the passwords match between files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/root/.my.cnf
If the passwords mismatch, correct them.
It must be exact same in both files.
Restart mysql:
# systemctl restart mariadb (if in CentOS7)
or
# service mariadb restart (if in CentOS6)
Regards,
Netino
the passwords in both files similar
# service mariadb restart
mariadb: unrecognized service
# mysqlcheck --all-databases -r #repair
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) when trying to connect
also /var/lib/mysql/mysql.sock is 0 kilibyte and not editable
What else comes to mind?
thanks
Seems you don't have mariadb installed.
Try that command with 'mysql'.
And list here the result of commands "systemctl status mariadb.service" or "systemctl status mysql.service" and "journalctl -xe".
#systemctl status mysql.service or systemctl status mysqld.service ->
command not found
#systemctl status mariadb.service ->
command not found
why?
# tail -f /var/log/mysqld.log
/usr/libexec/mysqld[0x7b0c10]
/usr/libexec/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x67b271]
/usr/libexec/mysqld[0x58fe78]
/usr/libexec/mysqld(_Z11plugin_initPiPPci+0x928)[0x593a68]
/usr/libexec/mysqld[0x519338]
/usr/libexec/mysqld(_Z11mysqld_mainiPPc+0x3fd)[0x51c5fd]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3d4d01ed1d]
/usr/libexec/mysqld[0x511c85]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Quote from: mouchoon on January 05, 2019, 08:07:04 PM
hello!
my server migrat to other location ... and my sql server crashed with this error in cwp:
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:
how to solve this problem? It seems that innodb
Hi,
I'm facing the same issue. I hope you have already resolved the issue. Can you please help me out to resolve mine too?
Why do you trying systemctl with CentOS 6? You must try service mysqld status or service mysqld restart