Author Topic: Can't start Mysql Server  (Read 4306 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Can't start Mysql Server
« on: August 17, 2020, 06:23:47 PM »
Good day my problem occurred recently. I couldn't access the client panel it would load open but nothing would load, giving me this error:

Code: [Select]
"Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory 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 followed theses instructions but nothing

At this point it was suggested that I changed password via command line I did that, but that made no difference I still couldn't log in to the admin panel.

The random generated password would NOT work anywhere, it was automatically updated in the db_conn.php and my.cnf and they both matched.

I also tried "sh /scripts/cwpsrv_rebuild_user_conf" but I think it once again gives access denied for root error


Throughout it all I could still access mysql using third party app using the custom password I chose within the admin panel, NOT random generated one.

I tried some suggestions on here but not seems like mysql server won't start anymore. I get the following error when I check status:
Code: [Select]
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and...
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Plugin 'InnoDB' init function returned error.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [Note] Plugin 'FEEDBACK' is disabled.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Unknown/unsupported storage engine: InnoDB
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Aborting
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: Failed to start MariaDB 10.1.44 database server.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: Unit mariadb.service entered failed state.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: mariadb.service failed.

Can anyone help please and thankyou!

Offline
*
Re: Can't start Mysql Server
« Reply #1 on: August 17, 2020, 06:27:19 PM »
Good day my problem occurred recently. I changed my password via admin panel after which I wasn't able to log back in I got this:

Code: [Select]
"Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory 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 followed theses instructions but nothing

At this point it was suggested that I changed password via command line I did that, but that made no difference I still couldn't log in to the admin panel.

The random generated password would NOT work anywhere, it was automatically updated in the db_conn.php and my.cnf and they both matched.

I also tried "sh /scripts/cwpsrv_rebuild_user_conf" but I think it once again gives access denied for root error


Throughout it all I could still access mysql using third party app using the custom password I chose within the admin panel, NOT random generated one.

I tried some suggestions on here but not seems like mysql server won't start anymore. I get the following error when I check status:
Code: [Select]
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and...
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Plugin 'InnoDB' init function returned error.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [Note] Plugin 'FEEDBACK' is disabled.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Unknown/unsupported storage engine: InnoDB
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com mysqld[3167]: 2020-08-17 13:53:38 139631234808064 [ERROR] Aborting
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: Failed to start MariaDB 10.1.44 database server.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: Unit mariadb.service entered failed state.
-bash: Aug: command not found
[root@srv1 ~]# Aug 17 13:53:38 myserver.com systemd[1]: mariadb.service failed.

Can anyone help please and thankyou!

Offline
*****
Re: Can't start Mysql Server
« Reply #2 on: August 18, 2020, 08:24:13 AM »
You can try the solution below:

Code: [Select]
cd /var/lib/mysql/
mv ib_logfile0 ib_logfile0_OLD
mv ib_logfile1 ib_logfile1_OLD
systemctl restart mariadb

If you still have the problem, you must asking some compitient system administraator. It's impossible to help on the forum with no server access.
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

Offline
*
Re: Can't start Mysql Server
« Reply #3 on: July 31, 2023, 12:13:38 PM »
I had exactly the same error after updating the php version to 7.4
Afterwards I restart apache and a couple more of services and I got into this error.
I have already checked the db user and password and it matches in both files.

Offline
*
Re: Can't start Mysql Server
« Reply #4 on: July 31, 2023, 12:21:50 PM »
I had to reboot my server (VPS)

Offline
*****
Re: Can't start Mysql Server
« Reply #5 on: August 01, 2023, 02:29:34 AM »
If you have crashed InnoDB tables, you can add these lines to / etc / my .cnf and restart mariadb:
Code: [Select]
# Recovery mode options
innodb_force_recovery = 1
innodb_purge_threads = 0
Quote
Warning
Only set innodb_force_recovery to a value greater than 0 in an emergency situation, so that you can start InnoDB and dump your tables. Before doing so, ensure that you have a backup copy of your database in case you need to recreate it. Values of 4 or greater can permanently corrupt data files. Only use an innodb_force_recovery setting of 4 or greater on a production server instance after you have successfully tested the setting on a separate physical copy of your database. When forcing InnoDB recovery, you should always start with innodb_force_recovery=1 and only increase the value incrementally, as necessary.

EDIT: The forum apparently REALLY doesn't want you to use the system path to MariaDB's config file...
« Last Edit: August 01, 2023, 02:37:53 AM by overseer »