mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
allow connecting to mysql db as root
This commit is contained in:
parent
96950e6d06
commit
8614a3e875
3 changed files with 18 additions and 7 deletions
|
|
@ -209,7 +209,7 @@ impl Database {
|
|||
Ok(Some(id))
|
||||
}
|
||||
|
||||
pub async fn exec(&self, docker: &mut Docker, cloud_id: &str) -> Result<i64> {
|
||||
pub async fn exec(&self, docker: &mut Docker, cloud_id: &str, root: bool) -> Result<i64> {
|
||||
match self.family() {
|
||||
DatabaseFamily::Sqlite => {
|
||||
exec_tty(
|
||||
|
|
@ -226,7 +226,13 @@ impl Database {
|
|||
docker,
|
||||
format!("{}-db", cloud_id),
|
||||
"mysql",
|
||||
vec!["mysql", "-u", "haze", "-phaze", "haze"],
|
||||
vec![
|
||||
"mysql",
|
||||
"-u",
|
||||
if root { "root" } else { "haze" },
|
||||
"-phaze",
|
||||
"haze",
|
||||
],
|
||||
vec![],
|
||||
)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue