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.
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"); }
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.