mirror of
				https://github.com/1Panel-dev/1Panel.git
				synced 2025-10-31 19:26:02 +08:00 
			
		
		
		
	fix: 解决创建数据库用户重复的问题 (#1837)
This commit is contained in:
		
							parent
							
								
									5f357db1e1
								
							
						
					
					
						commit
						a516ba9d63
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		|  | @ -39,6 +39,7 @@ func (r *Local) Create(info CreateInfo) error { | |||
| 	} | ||||
| 
 | ||||
| 	if err := r.CreateUser(info); err != nil { | ||||
| 		_ = r.ExecSQL(fmt.Sprintf("drop database if exists `%s`", info.Name), info.Timeout) | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,6 +40,7 @@ func (r *Remote) Create(info CreateInfo) error { | |||
| 	} | ||||
| 
 | ||||
| 	if err := r.CreateUser(info); err != nil { | ||||
| 		_ = r.ExecSQL(fmt.Sprintf("drop database if exists `%s`", info.Name), info.Timeout) | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue