We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffcad9e commit 6181690Copy full SHA for 6181690
sql-queries-10/checking-database-connectivity/mysql-check.sh
@@ -8,10 +8,10 @@ source mysql.env
8
echo "Testing MySQL connectivity..."
9
10
# Test MySQL connectivity and check for 'Department' table
11
-mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p "$MYSQL_PASS" -e "USE $MYSQL_DB; SHOW TABLES LIKE 'Department';" >/dev/null 2>&1
+mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" -e "USE $MYSQL_DB; SHOW TABLES LIKE 'Department';" >/dev/null 2>&1
12
13
if [ $? -eq 0 ]; then
14
echo "MySQL: Connection successful and department table exists."
15
else
16
echo "MySQL: Connection failed or department table does not exist."
17
-fi
+fi
0 commit comments