My Oracle Support Banner

mysqld --initialize --defaults-file Uses Wrong Data Directory (datadir) And Gives Error: "--initialize specified but the data directory has files in it. Aborting." (Doc ID 2146557.1)

Last updated on MARCH 23, 2020

Applies to:

MySQL Server - Version 5.7 and later
Information in this document applies to any platform.

Symptoms

When initializing the data directory manually using mysqld, the mysqld command returns this error while --defaults-file is a valid option and the data directory defined by --datadir in the given option file is empty.

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.