Sample Header Ad - 728x90

Mysql stopped working on my wordpress website

0 votes
0 answers
239 views
I'm not that experienced with linux or mysql so bear that in mind. I generated my website using the wordpress droplet on digital ocean and its been working fine, but today the website started saying Error establishing a database connection. So I power cycled the server and it didn't fix it. Next I went into the ssh console and used the command service mysql status It said: mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: deactivating (stop-sigterm) Process: 1790 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 1809 (mysqld) Status: "Server startup in progress" Tasks: 25 (limit: 1131) Memory: 627.8M CGroup: /system.slice/mysql.service └─1809 /usr/sbin/mysqld Which I think means that it exited while trying to start up. The error log says: 2023-05-21T00:40:44.983416Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.33-0ubuntu0.20.04.2) (Ubuntu). 2023-05-21T00:40:45.837488Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33-0ubuntu0.20.04.2) starting as process 3348299 2023-05-21T00:40:45.849124Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-05-21T00:40:57.249705Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2023-05-21T00:44:48.871761Z 4 [System] [MY-013381] [Server] Server upgrade from '80032' to '80033' started. 2023-05-21T00:49:24.748818Z 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL; ' failed with error code = 3664, error > 2023-05-21T00:49:24.770070Z 0 [ERROR] [MY-013380] [Server] Failed to upgrade server. 2023-05-21T00:49:24.770938Z 0 [ERROR] [MY-010119] [Server] Aborting 2023-05-21T00:49:25.380870Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.33-0ubuntu0.20.04.2) (Ubuntu). 2023-05-21T00:49:26.329708Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33-0ubuntu0.20.04.2) starting as process 3348366 2023-05-21T00:49:26.340737Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-05-21T00:49:37.907861Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2023-05-21T00:53:45.694567Z 4 [System] [MY-013381] [Server] Server upgrade from '80032' to '80033' started. So I assume that its trying to upgrade the server and failing every time. I tried to do it manually, but whenever I use service mysql stop. It just hangs there indefinitely. When I try to connect to the service with mysql -u root It says: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I tried stopping the processes using: sudo pkill mysql sudo pkill mysql sudo killall mysql sudo killall mysqld But they still appear in the list when I use htop so I assume its not working. I tried using killall -9 -r "mysqld" and it may have worked. I also selected the mysql process in htop and pressed f9+enter to send the kill signal to that process. Next I used the command: ps aux | grep mysql Which returned: root 2555 0.0 0.0 8160 724 pts/1 S+ 09:57 0:00 grep --color=auto mysql Which makes me think all the mysql processes are now dead. When I try to start the service again with: sudo service mysql start --skip-grant-tables It hangs for over a minute and says: Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. The /var/run/mysqld/mysqld.sock file does not exist, but /var/run/mysqld/mysqlx.sock and /var/run/mysqld/mysqlx.sock.lock does. Error log: 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33-0ubuntu0.20.04.2) starting as process 2781 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 4 [System] [MY-013381] [Server] Server upgrade from '80032' to '80033' started. 4 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL; ' failed with error code = 3664, error message = 'Failed to delete SDI 'mysql.user' in tablespace 'mysql'.'. 0 [ERROR] [MY-013380] [Server] Failed to upgrade server. 0 [ERROR] [MY-010119] [Server] Aborting How can I get mysql working again so my wordpress website can work?
Asked by John (101 rep)
May 21, 2023, 10:11 AM
Last activity: May 22, 2023, 10:56 PM