ScoopInstaller_Main/mysql.json
gnsngck 20290bf689 Edit post installation script of MySQL bucket (#1901)
* Edit post installation script of MySQL bucket

* Since MySQL 5.7.18, my-default file is no longer distributed in package so we can't the line to produce my.ini by copying my-default file.
* In Powershell, Out-file seems to make Byte Order Mark automatically and this occurs following error so this is a temporary commit which changes UTF-8 to ASCII doesn't make BOM.

mysql: [ERROR] Found option without preceding group in config file …\scoop\apps\mysql\current\my.ini at line 1!
mysql: [ERROR] Fatal error in defaults handling. Program aborted!

* mysql: fix whitespace
2017-12-12 13:11:18 +01:00

59 lines
1.9 KiB
JSON

{
"homepage": "https://dev.mysql.com/downloads/mysql/",
"version": "5.7.20",
"license": "GPLv2",
"architecture": {
"64bit": {
"url": "https://dev.mysql.com/get/mysql-5.7.20-winx64.zip",
"hash": "2f7fbebac1d679a5e154b7dcb2a91970c9450ba52fe39df90df1e7dbfdcc339c",
"extract_dir": "mysql-5.7.20-winx64"
},
"32bit": {
"url": "https://dev.mysql.com/get/mysql-5.7.20-win32.zip",
"hash": "f9db20a65f1a81a3c0e1828d29fe5cb364473a0969249492596b7bc0b617870d",
"extract_dir": "mysql-5.7.20-win32"
}
},
"bin": [
"bin\\mysqld.exe",
"bin\\mysql.exe",
"bin\\mysqldump.exe",
"bin\\mysqladmin.exe",
"bin\\mysqlbinlog.exe",
"bin\\mysqlcheck.exe",
"bin\\mysqlimport.exe",
"bin\\mysqlshow.exe",
"bin\\mysqlslap.exe",
"bin\\my_print_defaults.exe"
],
"persist": [
"data"
],
"post_install": "
#Initialize data directory (without generating root password)
if (!(Test-Path \"$dir\\data\\auto.cnf\")) {
mysqld --initialize-insecure
}
#Output client configuration to my.ini file so no username is required when connecting
echo \"\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
echo \"[client]\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
echo \"user=root\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
",
"checkver": {
"url": "https://dev.mysql.com/downloads/mysql/",
"re": "<h1>MySQL Community Server ([\\d.]+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://dev.mysql.com/get/mysql-$version-winx64.zip",
"extract_dir": "mysql-$version-winx64"
},
"32bit": {
"url": "https://dev.mysql.com/get/mysql-$version-win32.zip",
"extract_dir": "mysql-$version-win32"
}
}
}
}