File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3+ MYSQL_BIN=" "
4+
35if [ " $MYSQL_PWD " = " " ];
46then
57 export MYSQL_PWD=root
911 Linux* )
1012 ;;
1113 Darwin* )
12- mysqladmin --user=root --password=' ' --protocol=tcp password ' root'
14+ MYSQL_BIN=/opt/homebrew/opt/
[email protected] /bin/
15+ ${MYSQL_BIN} mysqladmin --user=root --password=' ' --protocol=tcp password ' root'
1316 ;;
1417 CYGWIN* |MINGW* |MINGW32* |MSYS* )
1518 mysqladmin --user=root --password=' ' --protocol=tcp password ' root'
2124# AUTH="--defaults-extra-file=./sql/my-gha.cnf"
2225
2326if [ " $1 " = " drop" ]; then
24- mysql --user=root -e ' DROP DATABASE IF EXISTS nictool;' || exit 1
27+ ${MYSQL_BIN} mysql --user=root -e ' DROP DATABASE IF EXISTS nictool;' || exit 1
2528fi
26- mysql --user=root -e ' CREATE DATABASE nictool;' || exit 1
29+ ${MYSQL_BIN} mysql --user=root -e ' CREATE DATABASE nictool;' || exit 1
2730
2831for f in ./sql/* .sql;
2932do
3033 echo " cat $f | mysql nictool"
31- cat $f | mysql --user=root nictool || exit 1
34+ cat $f | ${MYSQL_BIN} mysql --user=root nictool || exit 1
3235done
3336
3437exit 0
You can’t perform that action at this time.
0 commit comments