-
help help. database connection problem
i have a bit of a problem connecting to my db
I type in javap com.mysql.jdbc.Driver i get this, is this correct?
C:\>c:\j2sdk1.4.2_03\bin\javap com.mysql.jdbc.Driver
Compiled from "Driver.java"
public class com.mysql.jdbc.Driver extends com.mysql.jdbc.NonRegisteringDriver{
public com.mysql.jdbc.Driver();
throws java/sql/SQLException
static {};
}
Ive wrote a small program to connect to a database with the line
con = DriverManager.getConnection"jdbc:mysql:C:\\mysql\\data\\login", "tock","tick");
the first bit is the path is to my login folder with my mysql db in, the username and password are what ive put in my my.ini file, can anyone see where im going wrong? as i keep getting this message:
Exception: Invalid authorization specification, message from server: " Access denied for user: 'root@localhost' (Using password: YES)"
previously, my my.ini file didnt have a username and password, but i seem to connect fine using my php script with this script,
$conn = mysql_connect('localhost','root','') or die("Could not connect to mysql");
even now, now that i've put a username and password into my.ini
please help im confused
Thanks
Timmy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks