Troubleshooting Cockpit Login Error and MySQL Connection Issues

Last update:
Last verified version: AAC 4.4.3

Issue

Login to the Cockpit is not possible, and the following error message appears: 

Login Error: [ERR] could not get user by creds
ERROR: dial 127.0.0.1:3306: connect: connection refused

Possible solutions

Try to restart the MySQL Service:

sudo systemctl restart mysql.service

If the restart fails, restart the whole machine:

sudo systemctl reboot

If login is still not possible after reboot:

sudo systemctl status mysql.service

Then execute the following commands to get information about different aspects of your system, to better identify the issue:

sudo df -h # utilization of the partitions
sudo mount -l # list filesystem mounts
sudo free -m # display information about about memory usage
sudo pvs # display information about physical LVM partitions
sudo lvs # display information about logical volumes
sudo cat /etc/fstab # display static information about filesystems, their mountpoints and mount options
sudo journalctl -b | grep "lvm\|EXT4-fs" # list boot information

To check if the root partition is mounted as read only, use the following command:

sudo mount -l | grep ro,

To remount the root partition as read write, use the following command:

sudo mount -o remount,rw /

If the remount fails, try to repair the filesystem:

sudo fsck /dev/mapper/YOUR-SERVER--vg-root