Can u help me about this error

Jan 02 08:27:20 intranet-bdam systemd[1]: Starting MySQL Community Server…
Jan 02 08:27:20 intranet-bdam su[270317]: (to mysql) root on none
Jan 02 08:27:20 intranet-bdam su[270317]: pam_unix(su-l:session): session opened for user mysql by (uid=0)
Jan 02 08:27:20 intranet-bdam mysql-systemd-start[270282]: 2023-01-02T08:27:20.790509Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server
Jan 02 08:27:20 intranet-bdam mysql-systemd-start[270282]: 2023-01-02T08:27:20.791120Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
Jan 02 08:27:20 intranet-bdam mysql-systemd-start[270282]: 2023-01-02T08:27:20.791130Z 0 [ERROR] Aborting
Jan 02 08:27:20 intranet-bdam su[270317]: pam_unix(su-l:session): session closed for user mysql
Jan 02 08:27:23 intranet-bdam mysqld[270358]: Initialization of mysqld failed: 0
Jan 02 08:27:23 intranet-bdam systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE

1 Like

Hi @omadd

Could you verify that specified data folder is empty? An existing data directory is permitted to be nonempty if every entry has a name that begins with a period (. ).

2 Likes

Hi @omadd,

Thanks for reaching out. From the logs, it seems that you are trying to launch a new MySQL server on the machine where MySQL was previously installed or some directory is already present there. Can you explain what are you trying to do or if you are trying to install mysql, then remove this directory or create a new one and try again. Let us know and will be happy to help you.

1 Like