Skip to content

Commit 449d2f4

Browse files
committed
fix: added exec_mysql_root command
1 parent 9ac9c6c commit 449d2f4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

integration_tests.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,20 @@ def exec_mysql():
509509
os.execvp(cmd[0], cmd)
510510

511511

512+
@app.command()
513+
def exec_mysql_root():
514+
"""Start an interactive session in the server container."""
515+
_check_containers_running()
516+
cmd = _build_docker_cmd("mysql", use_root=True, cwd="/")
517+
cmd += [
518+
"bash",
519+
"-c",
520+
f"exec mysql --user={DB_ROOTUSER} --password={DB_ROOTPWD}",
521+
]
522+
typer.secho("Opening prompt inside server container", err=True, fg=c.GREEN)
523+
os.execvp(cmd[0], cmd)
524+
525+
512526
@app.command()
513527
def list_services():
514528
"""List the services which have been running.

0 commit comments

Comments
 (0)