Control Web Panel

WebPanel => MySQL => Topic started by: crashzk on October 20, 2021, 02:47:38 AM

Title: CWP Painel Root - MySQL Error Connection
Post by: crashzk on October 20, 2021, 02:47:38 AM
Today I started getting the following error on my CWP:
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 Control 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've already tried running the command he quotes.

Code: [Select]
Trying to start mysql server, please wait!
Try to restart Control Web Panel with command: sh /scripts/restart_cwpsrv

But nothing, same error yet.

I also checked the MySQL Root Password:
Code: [Select]
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf

How can I fix it? All my clients are offline as they don't have access to the MysQL database.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on October 30, 2021, 12:46:43 AM
Yeah, I have exactly the same thing.  And you will not be able to create db user.

When you get that error page, hit reload several times and the cwp will come back with db server running.

But still no way to create new users.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: cyberspace on November 02, 2021, 12:11:27 PM
Hi,

1. What does happen when you just run "mysql" in shell ? Are you able to connect to MySQL/MariaDB at all ?

2. Please make sure the login details listed in the file:

Code: [Select]
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
are correct and CWP is able to connect to the database with the login credentials from file. Just run the command provided below in shell:

Code: [Select]
mysql -u db_user -p db_pass -h localhost db_name
Replace db_user, db_pass, db_name with the actual values from the file.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: studio4host on November 03, 2021, 09:09:00 AM
first, check if MySQL is running and if it's working ok then only the password is an issue which you can fix by running this command

Code: [Select]
/scripts/mysql_pwd_reset
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 05, 2021, 07:53:48 PM
first, check if MySQL is running and if it's working ok then only the password is an issue which you can fix by running this command

Code: [Select]
/scripts/mysql_pwd_reset

You are missing the entire point.  This is a system wide failure.  Has nothing to do with me or you.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 05, 2021, 08:09:05 PM
Oddly, the User Tab on mysql manager DOES NOT EVEN OFFER A CREATE USER.   That sounds like total insanity to me. 
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 05, 2021, 08:11:26 PM
Cant we go back to the original mysql manager where everything worked PERFECTLY?
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 05, 2021, 09:48:59 PM
first, check if MySQL is running and if it's working ok then only the password is an issue which you can fix by running this command

Code: [Select]
/scripts/mysql_pwd_reset

Resetting password is not going to fix the inability for user creation.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Com-QuadTech on November 10, 2021, 12:20:12 AM
Same problem and not working!

CentOS 7 MySQL: Creation of users not possible. The manual creation of a user via MyAdmin is not possible.

Mysql Manager creates DB but no user, the subsequent creation of a user with password and full rights fails.
Grant ** all ** privileges on database; # 1133 - Can't find any matching row in the user table

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

When creating the user with full rights via MyAdmin comes: Grant ** all ** privileges on database; # 1133 - Can't find any matching row in the user table
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Sandeep on November 10, 2021, 05:38:42 PM
will be fixed in new version
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 11, 2021, 12:07:37 PM
Thanks!
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Com-QuadTech on November 12, 2021, 03:42:23 PM
will be fixed in new version

And when ?
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 12, 2021, 11:18:18 PM
will be fixed in new version

And when ?

Patience grasshopper.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 16, 2021, 11:18:51 PM
will be fixed in new version

1100 did not fix the create new user in mysql manager.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 17, 2021, 01:28:12 PM
will be fixed in new version

1100 did not fix the create new user in mysql manager.

Nor did 1101.
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 21, 2021, 09:48:38 PM
My servers still do not have a working add user in the GUI.  Is this going to be fixed?
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: studio4host on November 22, 2021, 06:12:09 AM
you have a support contact form on the cwp site if you have some specific issues.
https://control-webpanel.com/contact
Title: Re: CWP Painel Root - MySQL Error Connection
Post by: Namaste on November 24, 2021, 08:01:01 PM
Problem is database user with $ in the name.   $ causes js problem.  Will be fixed ASAP.   Sandeep discovered this bug.   BIG kudos to Sandeep.