From 88b6afc730cece8f2dddd12c452fba00422ccaec Mon Sep 17 00:00:00 2001 From: Yaser Hsueh Date: Tue, 3 Jan 2023 23:44:53 +0800 Subject: [PATCH] MySQL: Add version 8.0.31 --- bucket/mysql.json | 85 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 bucket/mysql.json diff --git a/bucket/mysql.json b/bucket/mysql.json new file mode 100644 index 0000000..b876e32 --- /dev/null +++ b/bucket/mysql.json @@ -0,0 +1,85 @@ +{ + "version": "8.0.31", + "description": "The world's most popular open-source database, supported by an active community.", + "homepage": "https://dev.mysql.com/downloads/mysql/", + "license": "GPL-2.0-only", + "notes": [ + "Run 'mysqld --standalone' or 'mysqld --console' to start the Database,", + "or run following command as administrator to register MySQL as a service. See: https://dev.mysql.com/doc/refman/en/windows-start-service.html", + "", + "mysqld --install MySQL --defaults-file=\"$dir\\my.ini\"", + "", + "To stop and/or delete the Service run 'sc stop MySQL' and 'sc delete MySQL'." + ], + "suggest": { + "Visual C/C++ Redistributable": "extras/vcredist2022" + }, + "architecture": { + "64bit": { + "url": "http://dl.simaek.com/scoop/buckets/custom/package/mysql-8.0.31-winx64.zip", + "hash": "md5:c9135ec4988a41a932f8db2b8661d1ad", + "extract_dir": "mysql-8.0.31-winx64" + } + }, + "pre_install": [ + "$ini = \"$dir\\my.ini\"", + "if (!(Test-Path \"$ini\")) {", + " # Using $dir instead of $persist_dir, causes this error:", + " # [ERROR] [MY-010187] [Server] Could not open file '~/scoop/apps/mysql/current/data/host.err' for error logging: Permission denied", + " Add-Content -Path \"$ini\" -Value \"[mysqld]`ndatadir=$($persist_dir -replace '\\\\', '/')/data\" -Encoding Ascii", + " # Set username so it's not required when connecting", + " Add-Content -Path \"$ini\" -Value \"[client]`nuser=root\" -Encoding Ascii", + "}" + ], + "post_install": [ + "if (!(Test-Path \"$dir\\data\\auto.cnf\")) {", + " warn 'Initializing data directory ...'", + " Invoke-ExternalCommand -FilePath \"$dir\\bin\\mysqld.exe\" -ArgumentList '--initialize-insecure'", + " warn 'Database has been initialized (username: root, password: )'", + "}" + ], + "bin": [ + "bin\\ibd2sdi.exe", + "bin\\innochecksum.exe", + "bin\\lz4_decompress.exe", + "bin\\myisamchk.exe", + "bin\\myisamlog.exe", + "bin\\myisampack.exe", + "bin\\myisam_ftdump.exe", + "bin\\mysql.exe", + "bin\\mysqladmin.exe", + "bin\\mysqlbinlog.exe", + "bin\\mysqlcheck.exe", + "bin\\mysqld.exe", + "bin\\mysqldump.exe", + "bin\\mysqlimport.exe", + "bin\\mysqlpump.exe", + "bin\\mysqlshow.exe", + "bin\\mysqlslap.exe", + "bin\\mysql_config_editor.exe", + "bin\\mysql_secure_installation.exe", + "bin\\mysql_ssl_rsa_setup.exe", + "bin\\mysql_tzinfo_to_sql.exe", + "bin\\mysql_upgrade.exe", + "bin\\my_print_defaults.exe", + "bin\\perror.exe", + "bin\\zlib_decompress.exe" + ], + "persist": [ + "data", + "my.ini" + ], + "checkver": "

MySQL Community Server ([\\d.]+)", + "autoupdate": { + "architecture": { + "64bit": { + "url": "https://dev.mysql.com/get/Downloads/MySQL-$majorVersion.$minorVersion/mysql-$version-winx64.zip", + "hash": { + "url": "https://dev.mysql.com/downloads/mysql/", + "regex": "md5\">$md5" + }, + "extract_dir": "mysql-$version-winx64" + } + } + } +}