my dog learned polymorphism*
The moose likes JDBC and the fly likes J2EE/J2SE JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "J2EE/J2SE JDBC" Watch "J2EE/J2SE JDBC" New topic
Author

J2EE/J2SE JDBC

Joe Pawlak
Greenhorn

Joined: Dec 02, 2003
Posts: 23
If I want to use JDBC to connect to a MySQL database, does it matter whether or not I use J2EE or J2SE?
Also, if it does not matter which Java SDK I use, which would you recommend and why?
Thanks.
nash avin
Ranch Hand

Joined: Nov 13, 2003
Posts: 96
Let me ask you a question,hope you can help me out.
this is the scene I am facing with MySql server on local machine
C:\Mysql\bin\mysql .I connect to MySql server by typing that command.
My question is how can I supply userid and password to connect to Mysql server.
hope that you got my question and have you tried it.
Let me know.Any help would be appreciated.
nash
Answer to your question,use Java 2 SDK 1.4.2 (latest) will support the various new technologies.
Joe Pawlak
Greenhorn

Joined: Dec 02, 2003
Posts: 23
When you type C:\Mysql\bin\mysql add the -p and -u option and supply the user, so the command now looks like this:
C:\Mysql\bin\mysql -u user -p
This should then ask you to supply a password for that user.
Or you could try C:\Mysql\bin\mysql -u user without the -p option.
nash avin
Ranch Hand

Joined: Nov 13, 2003
Posts: 96
thanks for the reply,
What is the password I need to give when I am using that option.I gave a few passwords but all of them are giving me errors.Let me know in detail.
any help would be appreciated
nash
Joe Pawlak
Greenhorn

Joined: Dec 02, 2003
Posts: 23
You could try logging in without the -p option, sometimes that works, or use whatever password you gave the user.
If you did not create a user, or forgot the password, then you will have to use the default account which is root with a blank password. After you login in, you can then create new users or change the password.
C:\Mysql\bin\mysql -u root -p
Then when it says Enter Password:, just press the enter key.
nash avin
Ranch Hand

Joined: Nov 13, 2003
Posts: 96
thanks for the reply,
It does work without the -p option.I havent set up an user account.
I was wondering whether you could guide me in setting up an user account and password, so that I can use the database and tables having the user.
thanks in advance
nash
Joe Pawlak
Greenhorn

Joined: Dec 02, 2003
Posts: 23
You could just use the default root account to access the DBs. The root account is equivalent to a Windows Administrator account. But, if you want to add a new user, at the mysql> prompt:
groupadd mysql
useradd -g mysql mysql
This makes a group called mysql and adds a user, mysql, to that group.
A more detailed way of setting up a user and giving them the right permissions is at: http://www.mysql.com/doc/en/Installing_binary.html#IDX203
nash avin
Ranch Hand

Joined: Nov 13, 2003
Posts: 96
hi thanks for the prompt reply mate, I will try that out and get back if I face a problem.
nash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: J2EE/J2SE JDBC
 
Similar Threads
Installing J2EE or J2SE JDK?
scjp and J2ee
J2SE NTLM Proxy Authentication
Multiple SDK's and JVM's
JDBC