This post originated from an RSS feed registered with Java Buzz
by Ben Hosking.
Original Post: My first steps using MySql
Feed Title: A Funny Java Flavoured Look at the World
Feed URL: http://jroller.com/hoskinator/feed/entries/rss
Feed Description: The blog looks at using Java and programming in general as it pops up in life as a Java programmer. It will have links to interesting Java articles and resources. It will also have a lot of SCJP Java 1.5 information and links as I am currently studying
I have been using MySQL this week which is my first foray into the MySQL world and I'm happy to say it has been a nice easy ride. I haven't done anything fancy with it, in fact I have really only be using it to create two very basic tables but basically I needed a database and MySql is free so it was a good choice.
The download from the site was simple and after I downloaded the latest MySql I downloaded a nice gui tool to go with it - MySQL GUI Tools 5.0. I have been using the Query browser or when I asked another developer which one of the exe's to use he said "the lightening bolt". The lightening bolt was very straightforward to use and creating the table was fairly easy but unfortunately I couldn't add in any rows in the gui dynamically and had to add the rows in using INSERT statements. I don't mind dabbling with an Insert statement but I always forget the syntax (single quotes, who would have thought), so if like me you need a bit of reminding check this link
INSERT into sites (ipaddress, sitename) values ('127.0.0.1', 'localhost');
I wrote some jdbc connection code for oracle, SqlServer, access and as we already have code to do such things I was thought I should add in another connection to fit it in with the rest of our code.
I found a couple of useful links to show me how to connect and the name of the driver, the first one was very useful
You have to download the MySql jar file and put it in the classpath or import it into your eclipse project. So now I am up and running with my MySql database, a table with some rows in and a JDBC connection and it was all fairly painless.
As Borat would say "HI FIIIIVEE"
If you like this blog or and fancy something a bit less technical with some laughing thrown in then check out my other blog Amusing IT Stories. Which is a blog about funny and amusing stories from the IT environment and the office. It is a mix of news, office humour, IT stories, links, cartoons and anything that I find funny