Aborted connection 3 to db: 'unconnected' user: 'Cpanel::MysqlUtils::Unprivileged' host: 'localhost' (Got an error writing communication packets)
mysqldump "all-database > all_databases.sql
service mysql stop
mv -v /var/lib/mysql{,.Backup.`date +%F.%T`}
mv -v /etc/my.cnf{,.Backup.`date +%F.%T`}
mysql_install_db
chown -R mysql.mysql /var/lib/mysql
service mysql start
Then reset mysql root password through WHM.
WHM >> SQL Services >> Reset MySQL Root Password
/usr/local/cpanel/bin/hulkdsetup
/usr/local/cpanel/bin/leechprotectinstall "force
/usr/local/cpanel/restoregrants "db=mysql "cpuser=USERNAME "all
The databases worked and the server was able to connect to them But when I try to access phpmyadmin I see a blank page. When I try to restart mysql I see the following:
/scripts/restartsrv_mysql
Waiting for "mysql" to start ""waiting for "mysql" to initialize "finished.
Service Status
mariadb (/usr/sbin/mariadbd) is running as mysql with PID 130124 (systemd+/proc check method).
Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Startup Log
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] InnoDB: 10.6.12 started; log sequence number 1260647474; transaction id 14654
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] Server socket created on IP: '0.0.0.0'.
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] Server socket created on IP: '::'.
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] /usr/sbin/mariadbd: ready for connections.
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: Version: '10.6.12-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Apr 15 10:58:27 207-231-110-144.cprapid.com systemd[1]: Started MariaDB 10.6.12 database server.
Apr 15 10:58:27 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:27 0 [Note] InnoDB: Buffer pool(s) load completed at 230415 10:58:27
Apr 15 10:58:29 207-231-110-144.cprapid.com mariadbd[130124]: 2023-04-15 10:58:29 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'Cpanel::MysqlUtils::Unprivileged' host: 'localhost' (Got an error writing communication packets)
The contents of the my.cnf file
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove the leading "# " to disable binary logging
# Binary logging captures changes between backups and is enabled by
# default. It's default setting is log_bin=binlog
# disable_log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#
# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password
[mysql.server]
user=mysql
basedir=/var/lib
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_allowed_packet=268435456
open_files_limit=40000
Any suggestions?
-
Have a look at /usr/local/cpanel/logs/error_log to see why PHPMyAdmin is showing blank. 0 -
It seems like the MariaDB installation might not be fully compatible with your cPanel environment, leading to issues with phpMyAdmin and MySQL connections. Let's try a few steps to troubleshoot and resolve the problem:
1. Update Configuration Files:
First, it appears that the unit file for MariaDB has changed. Run the following command to reload the units:
systemctl daemon-reload2. Check for Errors:
Examine the MySQL error log for any issues:
tail -n 50 /var/log/mysqld.logLook for any error messages that might indicate the source of the problem.
3. Verify Permissions:
Ensure that the MySQL user has the correct permissions on the necessary files and directories. You already ran
chown -R mysql.mysql /var/lib/mysql, which is good. Verify the permissions on the my.cnf file:ls -l /etc/my.cnfMake sure it's readable by the MySQL user.
4. Check PHPMyAdmin Configuration:
Verify the phpMyAdmin configuration. The configuration file might be pointing to the wrong MySQL socket or have other outdated settings. Check the phpMyAdmin configuration file (usually located at
/etc/phpMyAdmin/config.inc.php) and update any MySQL-related settings.5. Update PHP:
Ensure that PHP is up to date. Sometimes compatibility issues arise due to the PHP version. You can update PHP using your package manager.
yum update php6. Check Firewall:
Ensure that the firewall is not blocking the MySQL/MariaDB port (default is 3306). If you have a firewall, allow traffic on this port.
7. Recompile Apache/PHP:
Recompile Apache and PHP to make sure they are properly configured to work with the new MySQL/MariaDB installation.
This SEO Checker is a marketer's dream tool. It goes beyond surface-level analysis, providing deep insights into website SEO. I rely on it for regular check-ups and adjustments to keep my strategies on track. The user-friendly interface is a bonus for marketers with varying technical expertise.
0
Please sign in to leave a comment.
Comments
3 comments