Control Web Panel

WebPanel => E-Mail => DKIM => Topic started by: Hardoman on December 06, 2020, 04:23:00 PM

Title: DKIM Manager fails to connect to MySQL
Post by: Hardoman on December 06, 2020, 04:23:00 PM
When opening DKIM Manager section it shows multiple errors connecting to MySQL
Code: [Select]
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?
Title: Re: DKIM Manager fails to connect to MySQL
Post by: Hardoman on January 11, 2021, 04:10:15 AM
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)
Title: Re: DKIM Manager fails to connect to MySQL
Post by: studio4host on January 11, 2021, 09:52:34 AM
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
Title: Re: DKIM Manager fails to connect to MySQL
Post by: Hardoman on January 12, 2021, 12:26:28 AM
Thanks, I finally found the root cause.
in the old CWP installation /root/.my.cnf file looked like

Code: [Select]
[client]
user=root
password='password'

I have compared with a fresh installation and it looks like:
Code: [Select]
[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.
Title: macsales owc coupon code
Post by: mickysmith012 on April 29, 2021, 08:19:48 AM
I have saw all the things on your log and I felt good and unique. I have also blog on OWC promo code (https://www.dealforsoftware.com/owc-promo-code.html) with best offers.