tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugh Morgan <hughb...@gmail.com>
Subject Re: Newbie: Deploying .war file, getting it working with MySQL
Date Mon, 08 May 2006 16:00:30 GMT
Pascal wrote:
> Hello
> 
> Do you tried to connect to your databse normaly (I mean without tomcat) 
> to see if your user/pwd and database are set correctly in Mysql
> 
> Like this for example
> #mysql -uUSER -pPASSWORD DATABASE

root@server [~/temp/java]# mysql -uroot -pROOT_PASSWORD smsserver
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4264 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

> Are you sure the user have access authority to this databse from 
> localhost ?

I can get to it from a java app with this code;

Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost/smsserver";
con = DriverManager.getConnection(url, "root", "ROOT_PASSWORD");

I guess this proves  it works.

> I know this is very simple but sometimes....
> 
> Pascal

Yeah I know.  Thanks anyway.

Hugh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message