Author Topic: mysql crashed after server migration please help!  (Read 11020 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
mysql crashed after server migration please help!
« 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
« Last Edit: January 05, 2019, 08:12:25 PM by mouchoon »

Offline
***
Re: mysql crashed after server migration please help!
« Reply #1 on: January 06, 2019, 01:13:40 AM »
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

Offline
*
Re: mysql crashed after server migration please help!
« Reply #2 on: January 06, 2019, 09:52:52 PM »
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
« Last Edit: January 06, 2019, 10:34:35 PM by mouchoon »

Offline
***
Re: mysql crashed after server migration please help!
« Reply #3 on: January 06, 2019, 11:39:52 PM »
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".

Offline
*
Re: mysql crashed after server migration please help!
« Reply #4 on: January 07, 2019, 05:58:20 AM »
#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.
« Last Edit: January 07, 2019, 06:17:58 AM by mouchoon »

Offline
*
Re: mysql crashed after server migration please help!
« Reply #5 on: June 14, 2021, 06:53:23 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?

Offline
*****
Re: mysql crashed after server migration please help!
« Reply #6 on: July 11, 2021, 10:05:26 AM »
Why do you trying systemctl with CentOS 6? You must try service mysqld status or service mysqld restart
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services