• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem in Java Connection with MySQL in Linux Mandriva.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ???
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic