mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
fix: 解决创建数据库用户重复的问题 (#1837)
This commit is contained in:
parent
5f357db1e1
commit
a516ba9d63
@ -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…
x
Reference in New Issue
Block a user