Can’t connect to MySQL localhost:3306
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
Where or how do I solve this?
Can’t connect to MySQL localhost:3306
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
Where or how do I solve this?
start with checking your logs and service status. Maybe your mysql/mariadb service is down. Without additional informations, its imposisble to help…
sudo systemctl status mariadb.service
× mariadb.service - MariaDB 10.11.11 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Sun 2025-03-16 17:06:17 -03; 43s ago
Duration: 14.694s
Docs: man:mariadbd(8)
systemd - MariaDB Knowledge Base
Process: 1198509 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 1198510 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 1198512 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery
; [ $? -eq 0 ] && system>
Process: 1198574 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 1198574 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”
CPU: 185ms
Mar 16 17:05:47 servpc.cl systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server…
Mar 16 17:06:17 servpc.cl systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 17:06:17 servpc.cl systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Mar 16 17:06:17 servpc.cl systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.
admin_cgs@servpc:~$ sudo tail -f /var/log/mysql/error.log
2025-03-16 17:06:17 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
2025-03-16 17:06:17 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2025-03-16 17:06:17 0 [Note] InnoDB: Check that you do not already have another mariadbd process using the same InnoDB data or log files.
2025-03-16 17:06:17 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2025-03-16 17:06:17 0 [Note] InnoDB: Starting shutdown…
2025-03-16 17:06:17 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2025-03-16 17:06:17 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2025-03-16 17:06:17 0 [ERROR] Could not open mysql.plugin table: “Unknown storage engine ‘Aria’”. Some plugins may be not loaded
2025-03-16 17:06:17 0 [ERROR] Failed to initialize plugins.
2025-03-16 17:06:17 0 [ERROR] Aborting
Please read trough your log and do a minimal google search, you’ve got already hints within your log:
So please check running processes, if there is any existing mysql instance running, try the other suggested ways to solve when you google it and so on.
That error means MySQL is rejecting the credentials you’re using. A few things to check:
Verify root password – If it’s a fresh install, grab the temporary password from /var/log/mysql/error.log
.
Reset the root password if needed by starting MySQL with --skip-grant-tables
and running:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
FLUSH PRIVILEGES;
Check user@host mapping – root@localhost
may differ from [email protected]
. Confirm with:
SELECT user, host FROM mysql.user;
Also be sure the service is actually running:
systemctl status mysql
If the issue started after corruption or failed upgrades, the user table itself may be damaged. In that case, using a repair utility like Stellar Repair for MySQL can help fix corrupted system tables and restore proper access.
Please don’t execute this it will break how Hestia works …