mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 21:50:28 +08:00 
			
		
		
		
	MySQL安装程序支持8.2
This commit is contained in:
		@@ -408,7 +408,8 @@ func (this *MySQLInstaller) Download() (path string, err error) {
 | 
			
		||||
 | 
			
		||||
	// check latest version
 | 
			
		||||
	this.log("checking mysql latest version ...")
 | 
			
		||||
	var latestVersion = "8.1.0" // default version
 | 
			
		||||
	var latestVersion = "8.2.0" // default version
 | 
			
		||||
	var majorVersion = "8.2"
 | 
			
		||||
	{
 | 
			
		||||
		req, err := http.NewRequest(http.MethodGet, "https://dev.mysql.com/downloads/mysql/", nil)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
@@ -434,6 +435,10 @@ func (this *MySQLInstaller) Download() (path string, err error) {
 | 
			
		||||
			var matches = reg.FindSubmatch(data)
 | 
			
		||||
			if len(matches) > 0 {
 | 
			
		||||
				latestVersion = string(matches[1])
 | 
			
		||||
				var matchPieces = strings.Split(latestVersion, ".")
 | 
			
		||||
				if len(matchPieces) >= 2 {
 | 
			
		||||
					majorVersion = strings.Join(matchPieces[:2], ".")
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@@ -441,7 +446,7 @@ func (this *MySQLInstaller) Download() (path string, err error) {
 | 
			
		||||
 | 
			
		||||
	// download
 | 
			
		||||
	this.log("start downloading ...")
 | 
			
		||||
	var downloadURL = "https://cdn.mysql.com/Downloads/MySQL-8.1/mysql-" + latestVersion + "-linux-glibc2.17-x86_64-minimal.tar.xz"
 | 
			
		||||
	var downloadURL = "https://cdn.mysql.com/Downloads/MySQL-" + majorVersion + "/mysql-" + latestVersion + "-linux-glibc2.17-x86_64-minimal.tar.xz"
 | 
			
		||||
 | 
			
		||||
	{
 | 
			
		||||
		this.log("downloading from url '" + downloadURL + "' ...")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user