mysql.service failure and can't connect to mysql.sock file - Debian 12 VPS
Hello,
I hope I ask question in the right place and that there will be some expert who can help.
I installed yesterday Debian 12 on new VPS, then after php and apache I wanted to install mysql but I got problem, today I can not even start mysql, yesterday ir worked as process but not as port 3306.
let's start description of problem:
I downloaded with wget mysql-apt-config_0.8.33-1_all.deb
I installed this package and mysql server, I think I chose option 8.4.0, but it was not possible to use mysql because it was written there is already running mysql although command "netstat -tpln" showed me there is NO 3306 port connection, there was ssh and apache connection but not mysql. when I tried HTOP command, I saw mysql processes. In any case, mysql start restart and stop didn't help anything. I could not use mysql in my new VPS.
it was last night, today, I can not even start mysql server.
sudo systemctl start mysql
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
journalctl -xeu mysql.service
An ExecStart= process belonging to unit mysql.service has exited.
systemd[1]: mysql.service: Failed with result 'exit-code'.
systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start mysql.service - MySQL Community Server.
here is result from mysql error.log file:
[Server] /usr/sbin/mysqld (mysqld 8.0.40) starting as process 21134
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[ERROR] [MY-014061] [InnoDB] Invalid MySQL server downgrade: Cannot downgrade from 80403 to 80040. Downgrade is only permitted between patch releases.
mysqld: Can't open file: 'mysql.ibd' (errno: 0 - )
[ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.40) MySQL Community Server - GPL.
after that I tried to add client section in my.cnf file, but I get error can't connect with sock file:
mysql -u root -h localhost -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I tried mysql and mysqld folder in my.cnf file but it is the same error.
cat /etc/mysql/my.cnf
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[client]
password = ***secret***
port = 3306
host = 127.0.0.1
#socket = /var/lib/mysql/mysql.sock
socket=/var/run/mysqld/mysql.sock
yesterday i tried also to remove and purge and install mysql again, but I get again the same error.
any advice from anybody?
Subject
Written By
Posted
mysql.service failure and can't connect to mysql.sock file - Debian 12 VPS
January 02, 2025 10:44AM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.