[MDEV-17504] ERROR: 1049 Unknown database 'mysql' Created: 2018-10-19  Updated: 2019-01-11  Resolved: 2018-10-19

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows
Affects Version/s: 10.3.9
Fix Version/s: 10.3.11

Type: Bug Priority: Critical
Reporter: Jimi Jones Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows 10


Attachments: Text File mysql_install_db_log.txt     Text File mysqld_log.txt    

 Description   

I got different kind of error trying to install db.
First I tried this command:
mysql_install_db.exe --datadir=C:\...\mysql_data_dir -o
Where I got ERROR: 1049 Unknown database 'mysql'
And then
2018-10-19 15:33:40 0 [ERROR] Aborting

So following that jira to have more information:
mysqld --datadir=C:\...\mysql_data_dir --skip-grant-tables --console

So it seems I missed mysql database but it is not supposed to add it by itself?



 Comments   
Comment by Vladislav Vaintroub [ 2018-10-19 ]

mysql_install_db is supposed to create datadir, and mysql subdirectory inside it (i.e the database mysq), if those do not exist already. However as I checked, diagnostics in failure case are not very good (exactly, non-existent)

You can check why it failed, with procmon, and if you succeed, you can send the procmon output file .
My first guess would be permission problems

Comment by Vladislav Vaintroub [ 2018-10-19 ]

Added extensive diagnostics for the case creation of directories fail.

Generated at Thu Feb 08 08:36:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.