Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: bhv on July 15, 2019, 09:29:02 AM
-
I am unable to login as admin in my cwp also unable to update.
[root@server ~]# sh /scripts/update_cwp
====================================================
============= CentOS Web Panel Cron ================
====================================================
###########################
Firewall Flush Daily Blocks
###########################
######################
Update Server Packages
######################
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
PHP Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Could not select database root_cwp[root@server ~]#
-
seems like you've changed the mysql root password or deleted root_cwp database
-
seems like you've changed the mysql root password or deleted root_cwp database
I am sure I did no such thing but still let's say it happened by mistake by one of my team members. How can it be fixed?
-
Execute the following:
sh /scripts/mysql_pwd_reset
Yes, the error continues, please execute the following and show your output here, and I will be able to help you
sh /scripts/check_api
sh /scripts/cwpsrv_rebuild_user_conf
-
Execute the following:
sh /scripts/mysql_pwd_reset
Yes, the error continues, please execute the following and show your output here, and I will be able to help you
sh /scripts/check_api
sh /scripts/cwpsrv_rebuild_user_conf
here are the outputs
sh /scripts/mysql_pwd_reset
Please confirm MySQL root password reset. Continue? (y/N): y
Shutting down any mysql processes...
Stopping mysqld (via systemctl): [ OK ]
mysqld: no process found
Resetting password... hold on
ERROR 1146 (42S02) at line 1: Table 'mysql.user' doesn't exist
Cleaning up...
Stopping mysqld (via systemctl): [ OK ]
Killed mysqld(12643) with signal 15
Starting mysqld (via systemctl): Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[FAILED]
ERROR! MariaDB is not running
Password reset has been completed
New MySQL root password: [removed password]
Remember to store this password safely!
[root@server ~]# sh /scripts/check_api
User API port 2302 check: OK
Oauth query check: FAILED
User API folder check: OK
External API port 2304 check: OK
External API files and htaccess : FAILED
CSF Firewall status check: DISABLED
[root@server ~]# sh /scripts/cwpsrv_rebuild_user_conf
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
-
I am unable to login as admin in my cwp also unable to update.
[root@server ~]# sh /scripts/update_cwp
====================================================
============= CentOS Web Panel Cron ================
====================================================
###########################
Firewall Flush Daily Blocks
###########################
######################
Update Server Packages
######################
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
PHP Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Could not select database root_cwp[root@server ~]#
I suspect, just like everyone else, you have an old version of cwp. Once your cwp version is outdated by "x" amount of revisions, your admin page will not load AND you will not be able to update from shell. One thing that you should do for sure is turn off CSF and try to update. You might get lucky. But I dont think so.