MySQL and Java

MySQL and JavaShort Description
In this section we will create a new database, a new user, and a very simple table. MySQL has a two level directory like hierarchy for keeping databases and tables. At the root there is MySQL; under root you can only create “databases.” Database is almost like a directory, you can create “tables” under a database.

Website: www.cs.ucdavis.edu | Filesize: 121kb
No of Page(s): 7

Content

You must have noticed that DriverManager.getConnection takes three arguments. The first argument is the URL of the server; URLs always start with jdbc:mysql:// and followed by the server address and the database name. Therefore, if you are running the MySQL server on a different machine you should replace localhost with the correct machine address, either name or IP address. Moreover, you’ll need to replace 3306 with the number of the port your MySQL server is listening on. Next component of the URL is the database name. The second argument is the user name and the last one is the password.
…In this tutorial I explained, using MySQL, how to create a database, a user, and a simple table. I also explained how to connect to a MySQL database from a Java program and execute queries. The Java program I used as the example can be found in the appendix. You can use javac to compile the program.

Get the file Download here

AddThis Social Bookmark Button
Related Books:
  • Tutorial for MySQL An Introduction to Java Programming
  • Fixing MySQL after upgrading to Mac OS X 10.2
  • MySQL PHP Tutorial
  • Introduction to MySQL
  • Chapter 3. MySQL Tutorial
  • MySQL 5.0 Triggers MySQL 5.0 New Features Series Part 2
  • PHP/MySQL Tutorial webmonkey /programming/
  • A MySQL Tutorial

  • Related Searches: , , , ,



    Comments

    Leave a Reply