Fedora에 mysql/mysqld를 어떻게 다시 설치하나요?

Fedora에 mysql/mysqld를 어떻게 다시 설치하나요?

부팅되지 않는 문제가 있으므로 mysqld해당 파일을 지우거나 (적어도) 다시 설치하여 현재 프로필을 스톡 파일로 교체하여 다시 부팅할 수 있도록 하고 싶습니다.

이는 다음과 같습니다 journalctl -xeu mysqld.service.

░░ The job identifier is 276.
sep. 30 08:03:48 oberkommando systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit mysqld.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
sep. 30 08:03:48 oberkommando systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service has entered the 'failed' state with result 'exit-code'.
sep. 30 08:03:48 oberkommando systemd[1]: Failed to start mysqld.service - MySQL Server.
░░ Subject: A start job for unit mysqld.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit mysqld.service has finished with a failure.
░░ 
░░ The job identifier is 276 and the job result is failed.

이는 다음과 같습니다 /var/log/mysqld.log.

2022-09-28T22:24:53.958318Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2022-09-28T22:24:53.958374Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 11 in a file operation.
2022-09-28T22:24:53.958389Z 1 [ERROR] [MY-012596] [InnoDB] Error number 11 means 'Resource temporarily unavailable'
2022-09-28T22:24:53.958410Z 1 [ERROR] [MY-012215] [InnoDB] Cannot open datafile './ibdata1'
2022-09-28T22:24:53.958444Z 1 [ERROR] [MY-012959] [InnoDB] Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2022-09-28T22:24:53.958457Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Cannot open a file.
2022-09-28T22:24:54.458706Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-09-28T22:24:54.458838Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-28T22:24:54.458861Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-28T22:24:54.459186Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-29T09:52:22.805182Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1440
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-29T09:52:22.817204Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-29T09:52:22.817266Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-29T10:09:29.182680Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1455
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-29T10:09:29.186705Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-29T10:09:29.186770Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-29T10:14:02.494574Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 5767
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-29T10:14:02.495732Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-29T10:14:02.495795Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-29T19:49:57.027740Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1439
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-29T19:49:57.040203Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-29T19:49:57.040260Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-29T19:51:25.624747Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2022-09-29T19:51:25.624780Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 2639
2022-09-29T19:51:25.626154Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2022-09-29T19:51:25.626157Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-29T19:51:25.626617Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-29T19:51:25.626673Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2022-09-30T06:03:48.888324Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2022-09-30T06:03:48.888374Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1454
2022-09-30T06:03:48.900171Z 0 [Warning] [MY-010091] [Server] Can't create test file /var/lib/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
2022-09-30T06:03:48.900174Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
2022-09-30T06:03:48.901992Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-30T06:03:48.902046Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.

저는 Fedora 36을 사용하고 있으며 다음 패키지가 설치되어 있습니다.

mysql80-community-release-fc36-1.noarch
mysql-community-common-8.0.30-10.fc36.x86_64
mysql-community-client-plugins-8.0.30-10.fc36.x86_64
mysql-community-libs-8.0.30-10.fc36.x86_64
mysql-community-client-8.0.30-10.fc36.x86_64
mysql-community-icu-data-files-8.0.30-10.fc36.x86_64
mysql-community-server-8.0.30-10.fc36.x86_64
mysql-workbench-community-8.0.30-1.fc36.x86_64

사용MySQL 웹사이트.

문제는 이를 제거하고 싶지만 너무 많은 종속성을 제거하려고 하고 Fedora는 설치된 종속성이 손상되었음을 의미하는 경우 설치된 종속성을 유지하는 것을 허용하지 않는다는 것입니다.

답변1

sudo systemctl stop mysqld # not sure it's called this way
sudo rm -rf /var/lib/mysql # this will wipe out all the data inside the database - @toppk
sudo dnf reinstall mysql-community-server

관련 정보