my dog learned polymorphism*
The moose likes JDBC and the fly likes Problem in Java Connection with MySQL in Linux Mandriva. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem in Java Connection with MySQL in Linux Mandriva." Watch "Problem in Java Connection with MySQL in Linux Mandriva." New topic
Author

Problem in Java Connection with MySQL in Linux Mandriva.

AvtarSingh Suchariya
Greenhorn

Joined: Mar 18, 2010
Posts: 3
I have NetBeans 6.8 in Linux Mandriva 2008 .

I have Installed MySQL . MySQL is running perfectly. But he problem is with when I connect NetBeans Program With MySQL I am getting following Error.

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.

the above 2 lines is an error.
Java Code is.



the above is java code.

I have the following MySQL component Installed.

libmysql15 - MySQL Shared libraries
mysql-client - MySQL - Client
mysql-common - MySQL common files
mysql-gui-tools - GUI Tools for MySQL 5.0 - common files
mysql-max MySQL - Server with extended functionality
perl-DBD-mysql MySQL-perl buindings

I have also attached the mysql jar file that come with NetBeans 6.8.

Can Any One Help for this ???
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

"AvtarSingh Suchariya", please check your private messages for an administrative matter.

Welcome to Javaranch.

Please use Code tags when you post code. Makes your posts more readable. I have updated your post for you.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

Can you try to change your connection string to any of these:

jdbc:mysql://127.0.0.1:3306/crush_metal_web
jdbc:mysql://127.0.0.1/crush_metal_web


Regards, Jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Java Connection with MySQL in Linux Mandriva.
 
Similar Threads
another JDBC driver question
Strange JDBC-MySQL connection error
how to get started with jdbc
how to connect MySql
Error connecting on MySQL