Author Topic: Warning: mysqli_connect(): (HY000/1045) etc etc  (Read 25468 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Warning: mysqli_connect(): (HY000/1045) etc etc
« on: March 16, 2020, 08:15:56 AM »
Dear Sir,

I installed Centos web panel on a fresh installation of centos 7 web server locally. Everything works, including access to the CWP admin area which just logged in makes the following error. I looked for the solution on the web before writing, I followed every wise advice but nothing. I don't solve the problem.
Can this forum help me solve the problem?

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'postfix'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'postfix'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) 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 (Failed to restart cwpsrv-phpfpm.service: Unit not found.)

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


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

([root @ 192 ~] # wget https://192.168.1.11:2031/
--2020-03-16 09: 13: 04-- https://192.168.1.11:2031/
Connection to 192.168.1.11:2031...connected.
ERROR: impossible to verify the certificate of 192.168.1.11, issued by "/ C = HR / ST = Zagreb / ​​O = CentOS Web Panel / L = HR / CN = pettinati.ddns.net / OU = CentOS Web Panel / emailAddress = info @ studio4host.com "
  Found self-signed certificate.
    ERROR: the common certificate name "pettinati.ddns.net" does not match the host name  "192.168.1.11" required.
To connect to 192.168.1.11 in an unsafe way, use "--no-check-certificate".)


with best regards

Walter

Offline
*****
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #1 on: March 16, 2020, 01:35:27 PM »
hi check the mysql log is running or not and the logs for it why it have errors.

Offline
*
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #2 on: March 16, 2020, 02:02:24 PM »
How can I solve it?

Offline
*****
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #3 on: March 16, 2020, 09:35:33 PM »
hi you can run this command only if you changed the root password for mysql
Code: [Select]
sh /scripts/mysql_pwd_reset

Offline
*
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #4 on: May 11, 2020, 05:16:06 PM »
Hi

I am facing this issue when I try to login to phpmyadmin from the user cpanel, but phpmyadmin from the root dashboard works perfectly fine.

How can I fix this? My clients are unable to access their phpmyadmin page.

Offline
***
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #5 on: July 20, 2020, 04:04:05 AM »
It took me a day to track it down but I finally found the solution.  You need to delete or rename the tc.log file in /var/lib/mysql

First shut down mysql then delete, then restart mysql.  Everything came back to me. 

I have to say that this all happened because I uploaded a filed that (long story short) got into a loop that ended up completely filling up my hard drive.  After that, I was dead in the water with any db sites.  Now all is well.
Listen to everything Pixelpadre says.

Offline
***
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #6 on: July 20, 2020, 04:15:47 AM »
OK. all of my websites came back.  But the admin login page still gives me the white screen below.  Odd that all databases are working but cwp database.


Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) 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:
Listen to everything Pixelpadre says.

Offline
***
Re: Warning: mysqli_connect(): (HY000/1045) etc etc
« Reply #7 on: July 20, 2020, 11:35:49 AM »
OK.  got cwp panel back.  Here was the problem. 

Apparently, the original root password in cwp database was not changed when I changed the password while the server was off.  So I searched the database and found the password field was encrypted.  So I tried the old original password in the mycnf file and the db_conn files. and restarted the mysql server.  Now I have the cwp panel working again. 

I will investigate separating the database from the apache server.
Listen to everything Pixelpadre says.