Newbie in MYSQL

Discussion in 'MySQL' started by tanvirtonu, Nov 17, 2007.

  1. #1
    I m a newbie in MYSQL.Would somebody pls tell me the following questions-

    1. WHich is my original database after creating a Database(e.g. Student) in MySql .I mean in MSAcces DB I can find a .mdb file which is to be used.But in MySql which file to use. (If I create a database named- Student).Would I have to use the whole SQL folder including all files for a single DB.

    2. I want to use that DB in MYSQL with JAVA. Which should be the driver String for MySQL.
    I am new pls help me.
     
    tanvirtonu, Nov 17, 2007 IP
  2. Marko

    Marko Peon

    Messages:
    248
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1. MySQL is a server database !
    2. Download a driver and analyze this code

    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    System.out.println("Driver loaded);
    }
    catch (Exception e){System.out.println ("Driver Problemi");}


    try{
    con = DriverManager.getConnection("jdbc:mysql://yourhost/database","user","pass");
    System.out.println("Connected");
    }
     
    Marko, Nov 18, 2007 IP
  3. Kynlem

    Kynlem Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    MySQL stores files depending on the storage engine you use (except for tablename.frm file with table structure, which is created for all storage engines).

    MyISAM tables also have: tablename.myd (data) and tablename.myi (indexes) files.

    InnoDB tables have more complex storage architecture.
     
    Kynlem, Nov 20, 2007 IP