i basically need mySQL for learning JDBC connections. will be thankful to any information regarding this matter. didnt find anything concrete on the net...

Dani AI

Generated

Short answer: the 5.6 series was not shipped with official binary packages for Windows XP, so the Windows installer will refuse or ask for newer Windows updates (that’s why you hit the SP3 problem). As pointed toward the downloads and @somjit discovered during testing, the practical path on an XP SP2 machine is to use MySQL 5.5 (or upgrade the OS). (MySQL 5.6 announcement). (forums.mysql.com)

If you want the least friction for learning JDBC on that old box: install MySQL Community Server 5.5 (it was the current, widely used release that still provided Windows XP binaries), or use a bundled package (WAMP/XAMPP) that includes a 5.5 MySQL build. If you can upgrade to XP SP3, do that; better yet, run a small VM (VirtualBox) with a current Linux or Windows image and run modern MySQL there. (MySQL 5.5 downloads / docs). (dev.mysql.com)

Quick JDBC workflow for learning (works fine with MySQL 5.5):

  1. Install MySQL server and create a DB and a low-privilege user:

    CREATE DATABASE testdb;
    CREATE USER 'jdbcuser'@'localhost' IDENTIFIED BY 'strongpwd';
    GRANT ALL ON testdb.* TO 'jdbcuser'@'localhost';
    FLUSH PRIVILEGES;
  2. Add the official MySQL Connector/J (5.1 series) JAR to your project/classpath and use a simple connection:

    Class.forName("com.mysql.jdbc.Driver");
    Connection c = DriverManager.getConnection(
      "jdbc:mysql://localhost:3306/testdb?useSSL=false",
      "jdbcuser","strongpwd");

Connector/J 5.1 and later versions are compatible with MySQL 5.5/5.6 for typical JDBC use—see the Connector/J docs for exact compatibility notes. (Connector/J compatibility). (dev.mysql.com)

Caution: Windows XP is long out of support and insecure; for any real work or continued learning it’s safer to upgrade or use a VM so you can run supported MySQL releases and recent Java versions.

Recommended Answers

All 4 Replies

: thanks for the fast reply :)

im just gonna do this for learning purposes, so if i install 5.5 instead of 5.6 , do you think that would be good idea? the 5.6 version is a big file , and my connection is slowwww... so i just want to make sure whatever i download will work properly...

Look at the changelog for 5.6 and determine whether it has updates you really need.

downloaded the 5.6 version , and it needs sp3. guess ill just have to go with 5.5.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.