• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Java Connection with MySQL in Linux Mandriva.

 
AvtarSingh Suchariya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Jan Cumps
Bartender
Posts: 2586
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic