mariadb: Fix database initialization (#488)

- Add notes about running as a service
- Add info about default username/password
This commit is contained in:
Richard Kuhnt 2019-10-17 16:29:41 +02:00 committed by GitHub
parent 7bfacbf76c
commit 10c0d33ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,12 +44,19 @@
], ],
"persist": "data", "persist": "data",
"post_install": [ "post_install": [
"# Initialize data directory (without generating root password)", "if (!(Test-Path \"$dir\\data\\my.ini\") -and !(Test-Path \"$dir\\data\\my.cnf\") -and !(Test-Path \"$dir\\data\\mysql\")) {",
"if (!(Test-Path \"$dir\\data\\auto.cnf\")) { mysqld --initialize-insecure }" " warn 'Initializing data directory ...'",
" Invoke-ExternalCommand -FilePath \"$dir\\bin\\mysql_install_db.exe\" -ArgumentList @(\"--datadir=`\"$dir\\data`\"\")",
" warn 'Database has been initialized (username: root, password: <blank>)'",
"}"
], ],
"notes": [ "notes": [
"Run following command as administrator to run MariaDB as a service.", "Run 'mysqld --standalone' or 'mysqld --console' to start the Database,",
"mysqld --install \"[Service Name(default:MySQL)]\"" "or run following command as administrator to register MariaDB as a service. See: https://mariadb.com/kb/en/library/mysql_install_dbexe/",
"",
"mysql_install_db --service=MariaDB --password=NewRootPassword",
"",
"To stop and/or delete the Service run 'sc stop MariaDB' and 'sc delete MariaDB'."
], ],
"checkver": { "checkver": {
"url": "https://downloads.mariadb.org/", "url": "https://downloads.mariadb.org/",