github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/pkg/ddevapp/global_dotddev_assets/commands/host/mysqlworkbench.example (about) 1 #!/bin/bash 2 3 ## #ddev-generated 4 ## Description: Run MySQLWorkbench against current db 5 ## Usage: mysqlworkbench 6 ## Example: "ddev mysqlworkbench" 7 8 # Note that this example uses $DDEV_HOST_DB_PORT to get the port for the connection 9 # Mysql Workbench can be obtained from https://dev.mysql.com/downloads/workbench/ 10 11 query="root:root@127.0.0.1:${DDEV_HOST_DB_PORT}" 12 13 case $OSTYPE in 14 linux-gnu) 15 # You may need "apt-get install libproj-dev gnome-keyring" if it complains about those 16 mysql-workbench --query "$query" & 17 echo "Attempted to launch mysql-workbench" 18 ;; 19 20 "darwin"*) 21 "/Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench" --query "$query" & 22 echo "Attempted to launch MySQLWorkbench.app" 23 ;; 24 25 "win*"* | "msys"*) 26 # 'C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqlworkbench.exe' 27 # You may need to add it to your system %PATH% or change the path here 28 'C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqlworkbench.exe' --query "$query" 29 #;; 30 esac