R
RVic
I'm quite at a loss here.I'm using JDBC to connect to a MySQL database. If I type the command in from the command line (passing it the parameters for db name and user / password) it runs fine:
exec java -classpath .:$CLASSPATH:/home/user/ggrip/upserver/mysql-connector-java-5.1.26-bin.jar:/home/user/ggrip/upserver/GGUser.jar GG.GGServer "127.0.0.1:3306" ggripserver1 ggripv2 root root
However, if I create a bash file of the identical command and execute it, I'm getting:
user@Mint15-32 ~/ggrip/upserver $ echo $SHELL
/bin/bash
user@Mint15-32 ~/ggrip/upserver $ ./ggrip.sh
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)Error creating connection pool!
java.sql.SQLException: Can't connect with: com.mysql.jdbc.Driver to jdbc:mysql://127.0.0.1:3306/ggripv2 root root
I just don't get it?
exec java -classpath .:$CLASSPATH:/home/user/ggrip/upserver/mysql-connector-java-5.1.26-bin.jar:/home/user/ggrip/upserver/GGUser.jar GG.GGServer "127.0.0.1:3306" ggripserver1 ggripv2 root root
However, if I create a bash file of the identical command and execute it, I'm getting:
user@Mint15-32 ~/ggrip/upserver $ echo $SHELL
/bin/bash
user@Mint15-32 ~/ggrip/upserver $ ./ggrip.sh
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)Error creating connection pool!
java.sql.SQLException: Can't connect with: com.mysql.jdbc.Driver to jdbc:mysql://127.0.0.1:3306/ggripv2 root root
I just don't get it?