summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bin/mydbgen4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/mydbgen b/src/bin/mydbgen
index a251b9512..d19042f56 100755
--- a/src/bin/mydbgen
+++ b/src/bin/mydbgen
@@ -65,12 +65,14 @@ echo "What is your MySQL password?"
echo $n "-> $c"
stty -echo echonl
read cc
+SQLPASS_PREFIX=""
if [ ! -z "$cc" ] ; then
+ SQLPASS_PREFIX="-p"
SQLPASS=$cc
fi
stty $OLD_TTY
-mysqlshow -h$SQLHOST -u$SQLUSER >/dev/null 2>&1
+mysqlshow -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS >/dev/null 2>&1
if test "$?" = "1" ; then
echo "Error: Unable to login, verify your login/password and hostname"
exit