Bug 1873999 - Mariadb FailsToStart on Fedora-33 and 34 with "@MYSQL_DATADIR@ is not empty" message
Summary: Mariadb FailsToStart on Fedora-33 and 34 with "@MYSQL_DATADIR@ is not empty" ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1860490
TreeView+ depends on / blocked
 
Reported: 2020-08-31 09:35 UTC by Lukas Javorsky
Modified: 2020-10-01 00:15 UTC (History)
8 users (show)

Fixed In Version: mariadb-10.4.14-2.fc32 mariadb-10.4.14-2.fc33
Clone Of:
Environment:
Last Closed: 2020-09-05 18:32:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Javorsky 2020-08-31 09:35:40 UTC
1. Please describe the problem:
When trying to start mariadb server, initialization fails with message:  "Database MariaDB is not initialized, but the directory @MYSQL_DATADIR@ is not empty, so initialization cannot be done."


2. Specify used package versions
# dnf list installed | grep -i -e maria -e mysql -e galera
mariadb.x86_64                           3:10.4.14-1.fc33         
mariadb-backup.x86_64                    3:10.4.14-1.fc33                     
mariadb-common.x86_64                    3:10.4.14-1.fc33                      
mariadb-connector-c.x86_64               3.1.9-5.fc33                          
mariadb-connector-c-config.noarch        3.1.9-5.fc33                         
mariadb-cracklib-password-check.x86_64   3:10.4.14-1.fc33                     
mariadb-errmsg.x86_64                    3:10.4.14-1.fc33                     
mariadb-gssapi-server.x86_64             3:10.4.14-1.fc33                      
mariadb-server.x86_64                    3:10.4.14-1.fc33                      
mariadb-server-utils.x86_64              3:10.4.14-1.fc33                      
mysql-selinux.noarch                     1.0.0-10.fc33                         
perl-DBD-MySQL.x86_64                    4.050-9.fc33                  


3. Does a systemd journal say anything about the issue?
# journalctl -xe -u mariadb -u mysqld

Database MariaDB is not initialized, but the directory @MYSQL_DATADIR@ is not empty, so initialization cannot be done.
Make sure the @MYSQL_DATADIR@ is empty before running mysql-prepare-db-dir.


4. Please check and attach the MariaDB or MySQL server log?  ("/var/log/mariadb/mariadb.log" or "/var/log/mysql/mysqld.log")

cat: /var/log/mariadb/mariadb.log: No such file or directory
- Directory /var/log/mariadb exists, but it's empty


5. Please check and paste your configuration here; remove sensitive information.
# /usr/libexec/mysqld --print-defaults

--datadir=@MYSQL_DATADIR@ --socket=@MYSQL_UNIX_ADDR@ --log-error=@LOG_LOCATION@ --pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid

5. Can you reproduce this issue? If so, please provide the steps to reproduce the issue below:
1. dnf install -y mariadb mariadb-server
2. sudo systemctl start mariadb

6. Additional info:
This issue occurs on Fedora-Rawhide too.

# dnf list installed | grep -i -e maria -e mysql -e galera
mariadb.x86_64                         3:10.4.13-7.fc34                   
mariadb-backup.x86_64                  3:10.4.13-7.fc34                  
mariadb-common.x86_64                  3:10.4.13-7.fc34                   
mariadb-connector-c.x86_64             3.1.9-5.fc33                        
mariadb-connector-c-config.noarch      3.1.9-5.fc33                              
mariadb-cracklib-password-check.x86_64 3:10.4.13-7.fc34                           
mariadb-errmsg.x86_64                  3:10.4.13-7.fc34                           
mariadb-gssapi-server.x86_64           3:10.4.13-7.fc34                           
mariadb-server.x86_64                  3:10.4.13-7.fc34                           
mariadb-server-utils.x86_64            3:10.4.13-7.fc34                           
mysql-selinux.noarch                   1.0.0-10.fc33                              
perl-DBD-MySQL.x86_64                  4.050-9.fc33

Comment 1 Lukas Javorsky 2020-08-31 13:55:29 UTC
Thanks to Michal, we've found that the issue may be caused in this patch: https://src.fedoraproject.org/rpms/mariadb/blob/master/f/mariadb-ownsetup.patch

Cmake should expand the @MYSQL_DATADIR@ macro, but it doesn't do that, so we are going to investigate why it doesn't do that.

Comment 2 Fedora Update System 2020-09-03 19:52:08 UTC
FEDORA-2020-47f48474ae has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47f48474ae

Comment 3 Fedora Update System 2020-09-03 19:52:12 UTC
FEDORA-2020-b6ef280648 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b6ef280648

Comment 4 Fedora Update System 2020-09-04 02:13:51 UTC
FEDORA-2020-9c0d1f10a5 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9c0d1f10a5

Comment 5 Fedora Update System 2020-09-04 15:28:09 UTC
FEDORA-2020-9c0d1f10a5 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9c0d1f10a5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9c0d1f10a5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-09-04 19:16:35 UTC
FEDORA-2020-b6ef280648 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b6ef280648`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b6ef280648

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-09-05 18:32:23 UTC
FEDORA-2020-9c0d1f10a5 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2020-10-01 00:15:07 UTC
FEDORA-2020-b6ef280648 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.