Must I install additionally anything to use this driver
"org.gjt.mm.mysql.Driver" ?
I already have installed the JDK and MySQL.
My system is Win98, and I'm making my first apps in Java and MySQL in my
home PC.

If the database name is "lalibertad":

Then the url is:
"jdbc:mysql://localhost/lalibertad"
Right?

What about user and password?

Where must I create the user? In the ODBC control panel of Win98? Or in the
MySQL manager? How?
What about the port? Must I specify them in the URL?
Please explain me.

Is there another mysql manual (not this from mysql.com) to learn from
beginning step by step?


Regards,
Daniel Aderhold

Thanks to all for your help.


----- Original Message -----
From: Siomara Pantarotto <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 9:37 PM
Subject: Re: java connection


> // Copyright (c) 2000 Appiant Technologies
>
> import java.sql.*;
>
> public class ConnectMysql
> {
>     public static void main (String[] args)
>     {
>         Connection conn = null;
>         String url = "jdbc:mysql://localhost/db_name";
>         String url = "jdbc:mysql://localhost/pip";
>
>         try
>         {
>             Class.forName ("org.gjt.mm.mysql.Driver").newInstance ();
>             conn = DriverManager.getConnection (url, "root", "toor");
>             System.out.println ("Connected");
>             String sql = "select * from Folders where userName = 'Sio'";
>             Statement sta = conn.createStatement();
>             ResultSet rs = sta.executeQuery(sql);
>             while( rs.next() ){
>                 System.out.println( rs.getString(1)+ "   " +
>                 rs.getString(2)+ "   " +
>                                     rs.getString(3));
>         }
>
>         }
>         catch (Exception e)
>         {
>             System.err.println ("Cannot connect to server");
>             System.err.println (e);
>         }
>         finally
>         {
>             try
>             {
>                 if (conn != null)
>                 {
>                     conn.close ();
>                     System.out.println ("Disconnected");
>                 }
>             }
>             catch (Exception e) { /* ignore close errors */ }
>         }
>     }
> };
>
>
>
> >From: "Daniel Aderhold" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: java connection
> >Date: Mon, 2 Jul 2001 18:46:08 -0500
> >
> >Hi
> >I'm new to MySQL.
> >Please can anyone give me the connection sentences in Java.
> >
> >Exactly:
> >
> >How to charge the driver:
> >
> >Class.forName(" ................
> >
> >I use windows98. And want to make experimental local connections.
> >
> >Regards,
> >Daniel Aderhold
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to