File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
CREATE DATABASE databaseName doesn't seem to work
Joined: Apr 11, 2005
Apr 11, 2009 13:48:07
I can't seem to get 'create database' to work when my web app (as war file)
on server tries to connect to MySql on server.
Basically I have..
url = "jdbc:mysql://localhost/"; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(url, userName, password);
Then I do...
Statement s = conn.createStatement(); s.executeUpdate("CREATE DATABASE database1");
This works locally on my pc, when I connect to MySql installed on pc,
but not when on the server, connecting to MySql on the server.
Is there anything I can do?
Joined: Feb 22, 2009
Apr 11, 2009 16:57:33
Check the user privileges. See
MYSQL - User Grants
I agree. Here's the link:
subject: CREATE DATABASE databaseName doesn't seem to work
Web Srevices with Database
connection with database
MySQL user and password errors
JSPs and Servlets - how to execute?
Don't know how to connect to MySql
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014