New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

DKIM Manager fails to connect to MySQL

Started by Hardoman, December 06, 2020, 04:23:00 PM

Previous topic - Next topic

Hardoman

When opening DKIM Manager section it shows multiple errors connecting to MySQL

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

Warning: mysqli_query(): Couldn't fetch mysqli in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0

Notice: Trying to get property 'num_rows' of non-object in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0

Warning: mysqli_query(): Couldn't fetch mysqli in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0

Notice: Trying to get property 'num_rows' of non-object in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0

Warning: mysqli_query(): Couldn't fetch mysqli in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0

Notice: Trying to get property 'num_rows' of non-object in /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php on line 0


Root account is set with password and doesn't have any other issues with the other SQL tables.
There is no bind-address set in /etc/my.cnf so I don't know if localhost if suitable for connection.

Seems it's not happy with @localhost (may be it wants "127.0.0.1" but I don't know which CWP config files to change) or for some reason root is missing some permissions over some table?

How to fix it?

Hardoman

#1
Hey support!
Can you at least tell me which file is used for SQL settings when connecting from /usr/local/cwpsrv/htdocs/resources/admin/modules/dkim.php

I changed my SQL root password manually some time ago and seems it's not updated somewhere in CWP config.
(Of course in /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php root pass is correct)

studio4host

http://wiki.centos-webpanel.com/how-to-reset-mysql-root-password
maybe you have some special characters, probably the best is to use the cwp auto-generate random password
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Hardoman

Thanks, I finally found the root cause.
in the old CWP installation /root/.my.cnf file looked like

[client]
user=root
password='password'


I have compared with a fresh installation and it looks like:
[client]
password=password
user=root


I removed the ' ' symbols from the password and it started to work perfectly well.
Note: nevertheless CWP was auto-updated the my.cnf file remained old

Hope it will help someone because it caused may other related issues including cron fails.
I also prevented New backup page to show up (it was completely blank)...

Issue resolved, thanks.

mickysmith012

I have saw all the things on your log and I felt good and unique. I have also blog on OWC promo code with best offers.