Configure SQuirreL with MySQL


SQuirreL is great because is universal and platform independent. You can use it to connect to almost every database that you can imagine.
The only drawback is that it doesn't ship with the database drivers due to licensing issues.

So here is a step-by-step procedure for connecting to MySQL from SQuirreL.

First of all verify that you have network access to the mysql host and its port. Usually mysql servers run at port 3306, so test the connection from your host:
telnet xxx.xxx.xxx.xxx 3306

If you get something like:
Trying xxx.xxx.xxx.xxx...
telnet: Unable to connect to remote host: Connection refused

then you won't be able to connect.

The correct response you should get is something like:
Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xxx.

Then you must check that the database user you will be using has access from the host that the squirrel client will run.

You can check the privileges using phpmyadmin, or by command line:
GRANT USAGE ON *.* TO 'user'@'hostname'

Now go to SQuirrel's website, download and install it.

When you run the program you will see on your left pane a list of database drivers. Most of them are not installed, so we have to manually install the drivers we use often, eg MySQL, Oracle, Sybase etc.

Now, download the platform independent mysql jdbc driver from http://dev.mysql.com/downloads/connector/j/

Unzip/untar the downloaded file. In the uncompressed folder you should see a file named mysql-connector-java-X.X.XX-bin.jar. Place this file file into the lib subfolder under SQuirreL's install folder.

This is the mysql jdbc driver.
We are now ready to install the mysql jdbc driver.
Scroll down to the MySQL driver, double-click it and set the Extra Class Path as illustreted below:


Press OK, if everything is fine, then you will see the following screen:


Now you can create your connection(s) to any mysql database(s) by using the aliases tab:



Use the "Test" button to test your connection
Hopefully the connection should be created successfully...

Have fun with your queries!

37 comments:

  1. Thanks a lot for the tutorial, I was stuck with connecting but your tutorial helped me a lot.

    ReplyDelete
  2. Thank you very much for the tutorial, it worked fine :D

    ReplyDelete
  3. Thanks so much for your clear tutorial! The official site certainly lacks a lot of this documentation.

    ReplyDelete
  4. You can check free tool Valentina Studio http://www.valentina-db.com/en/valentina-studio-overview which I think is far superior to other GUI tools.

    ReplyDelete
  5. Thank you so much for this tutorial.
    It is a helpful post.

    ReplyDelete
  6. Great tutorial. I should note that when attempting this with hostgator I could never get telnet to work, but it worked fine when connecting through squirrel. I used my cpanel username and password, and I used the ip address that it showed me inside cpanel on the left column towards the bottom.

    ReplyDelete
  7. An important catch: for SQuirreL to be able to load the driver/connector you need to place its .jar file into the lib subfolder under SQuirreL's install folder.

    ReplyDelete
  8. Thanks for taking the time to write the tutorial!

    ReplyDelete
  9. Thank you!

    How did you know to add jdbc:mysql:// and then the port number at the end (:3306) of the URL?

    ReplyDelete
  10. This is ansuperior writing service point that doesn't always sink in within the context of the classroom. In the first superior writing service paragraph you either hook the reader's interest or lose it. Of course your teacher, who's getting paid to teach you how to write an good essay, 
    python Training institute in Pune
    python Training institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

    ReplyDelete
  13. This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb.
    This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here 


    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing
    apple service center chennai
    apple service center in chennai
    apple mobile service centre in chennai
    apple service center near me

    ReplyDelete
  16. Really very happy to say that your post is very interesting. I never stop myself to say something about it. You did a great job. Keep it up.
    We have an excellent IT courses training institute in Hyderabad. We are offering a number of courses that are very trendy in the IT industry. For further information, please once go through our site. DevOps Training In Hyderabad

    ReplyDelete
  17. Offshore Hosting By #1 Trusted Offshore Host Provider. https://offshorededicated.net

    ReplyDelete
  18. OffshoreDedi offers high quality DMCA Ignored Hosting. We make offshore hosting simple for you to use with reliable servers and one-click installers. Your data is safe with us as it’s is kept in a high security facility in an offshore jurisdiction assuring your privacy.

    ReplyDelete
  19. Webcare360 Provides you safe and secure cheap Offshore Hosting Best offshore hosting and DMCA ignore Hosting with 99.9% Up time Guarantee, with Ddos protection.

    ReplyDelete
  20. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ReplyDelete

  21. I feel very grateful that I read this. It is very helpful and very informative and I Python training in pune really learned a lot from it.

    ReplyDelete

  22. Erectile dysfunction is a condition where a man is not able to get an erection. Even if they are able to get an erection, it does not last for too long. Suffering from erectile dysfunction can affect the person both physically and mentally. Therefore a person needs to take medical help to make the condition better. Also suffering from erectile dysfunction can affect the relation of the person with their partners. The medication that has brought about a wave of change in this field is the use of Viagra for erectile dysfunction. It works by targeting the basic cause of the issue thus helping millions of men all across the world. If you are a man who has been facing an issue with getting and maintaining an erection for a long time now, then you should
    .Buy Viagra online

    ReplyDelete

  23. Erectile dysfunction is a condition where a man is not able to get an erection. Even if they are able to get an erection, it does not last for too long. Suffering from erectile dysfunction can affect the person both physically and mentally. Therefore a person needs to take medical help to make the condition better. Also suffering from erectile dysfunction can affect the relation of the person with their partners. The medication that has brought about a wave of change in this field is the use of Viagra for erectile dysfunction. It works by targeting the basic cause of the issue thus helping millions of men all across the world. If you are a man who has been facing an issue with getting and maintaining an erection for a long time now, then you should
    .Buy Viagra online

    ReplyDelete