Initialize MySQL if the data directory is missing
This commit is contained in:
parent
5ace56e9d8
commit
834a6abdc8
|
@ -12,9 +12,12 @@ in mkShell {
|
|||
|
||||
shellHook = ''
|
||||
trap "kill 0" EXIT
|
||||
[ -d ${data_dir} ] || mkdir ${data_dir}
|
||||
|
||||
mysqld --datadir="${data_dir}" --socket="${socket}" --initialize-insecure
|
||||
|
||||
if [ ! -d ${data_dir} ]; then
|
||||
mysqld --datadir="${data_dir}" --socket="${socket}" --initialize-insecure
|
||||
fi
|
||||
|
||||
mysqld --datadir="${data_dir}" --socket="${socket}" --skip-networking --skip-mysqlx &
|
||||
sleep 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue