ngak bisa akses Mysql

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ngak bisa akses Mysql

mujib Ziq
gw udah instal netbeans di linux (mandriva 2007), udh gw tambahin
driver, tapi pas gw cb konek ke database mysql pake netbeans muncul
erorr :

com.mysql.jdbc.CommunicationsException: Communications link failure
due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

null
STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at Prog.MDIUtama.testDriver(MDIUtama.java:910)
        at Prog.MDIUtama.Login(MDIUtama.java:879)
        at Prog.MDIUtama.BtnLoginActionPerformed(MDIUtama.java:829)
        at Prog.MDIUtama.access$200(MDIUtama.java:28)
        at Prog.MDIUtama$3.actionPerformed(MDIUtama.java:154)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


** END NESTED EXCEPTION **

tolong bantuin donk, apa ada yang harus di setting pada mysql standart
bawaan dari mandriva...????

thanks before.....
Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

Ahmad Satiri
cek di /etc/my.cnf  pastiin enable_networking nya on. (defaultnya disable)
buat user  baru+password,  sepengalaman gw , kalo pake password kosong
jdbc gak mau connect ke mysql.

Satiri

mujib Ziq wrote:

>
> gw udah instal netbeans di linux (mandriva 2007), udh gw tambahin
> driver, tapi pas gw cb konek ke database mysql pake netbeans muncul
> erorr :
>
> com.mysql.jdbc. CommunicationsEx ception: Communications link failure
> due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketExce ption
> MESSAGE: java.net.ConnectExc eption: Connection refused
>
> null
> STACKTRACE:
>
> java.net.SocketExce ption: java.net.ConnectExc eption: Connection refused
> at com.mysql.jdbc. StandardSocketFa ctory.connect( StandardSocketFa
> ctory.java: 156)
> at com.mysql.jdbc. MysqlIO.< init>(MysqlIO. java:276)
> at com.mysql.jdbc. Connection. createNewIO( Connection. java:2666)
> at com.mysql.jdbc. Connection. <init>(Connectio n.java:1531)
> at com.mysql.jdbc. NonRegisteringDr iver.connect( NonRegisteringDr
> iver.java: 266)
> at java.sql.DriverMana ger.getConnectio n(DriverManager. java:582)
> at java.sql.DriverMana ger.getConnectio n(DriverManager. java:185)
> at Prog.MDIUtama. testDriver( MDIUtama. java:910)
> at Prog.MDIUtama. Login(MDIUtama. java:879)
> at Prog.MDIUtama. BtnLoginActionPe rformed(MDIUtama .java:829)
> at Prog.MDIUtama. access$200( MDIUtama. java:28)
> at Prog.MDIUtama$ 3.actionPerforme d(MDIUtama. java:154)
> at javax.swing. AbstractButton. fireActionPerfor med(AbstractButt
> on.java:1995)
> at javax.swing. AbstractButton$ Handler.actionPe rformed(Abstract
> Button.java: 2318)
> at javax.swing. DefaultButtonMod el.fireActionPer formed(DefaultBu
> ttonModel. java:387)
> at javax.swing. DefaultButtonMod el.setPressed( DefaultButtonMod
> el.java:242)
> at javax.swing. plaf.basic. BasicButtonListe ner.mouseRelease
> d(BasicButtonLis tener.java: 236)
> at java.awt.Component. processMouseEven t(Component. java:6038)
> at javax.swing. JComponent. processMouseEven t(JComponent. java:3260)
> at java.awt.Component. processEvent( Component. java:5803)
> at java.awt.Container. processEvent( Container. java:2058)
> at java.awt.Component. dispatchEventImp l(Component. java:4410)
> at java.awt.Container. dispatchEventImp l(Container. java:2116)
> at java.awt.Component. dispatchEvent( Component. java:4240)
> at java.awt.Lightweigh tDispatcher. retargetMouseEve nt(Container.
> java:4322)
> at java.awt.Lightweigh tDispatcher. processMouseEven t(Container.
> java:3986)
> at java.awt.Lightweigh tDispatcher. dispatchEvent( Container. java:3916)
> at java.awt.Container. dispatchEventImp l(Container. java:2102)
> at java.awt.Window. dispatchEventImp l(Window. java:2429)
> at java.awt.Component. dispatchEvent( Component. java:4240)
> at java.awt.EventQueue .dispatchEvent( EventQueue. java:599)
> at java.awt.EventDispa tchThread. pumpOneEventForF ilters(EventDisp
> atchThread. java:273)
> at java.awt.EventDispa tchThread. pumpEventsForFil ter(EventDispatc
> hThread.java: 183)
> at java.awt.EventDispa tchThread. pumpEventsForHie rarchy(EventDisp
> atchThread. java:173)
> at java.awt.EventDispa tchThread. pumpEvents( EventDispatchThr
> ead.java: 168)
> at java.awt.EventDispa tchThread. pumpEvents( EventDispatchThr
> ead.java: 160)
> at java.awt.EventDispa tchThread. run(EventDispatc hThread.java: 121)
>
> ** END NESTED EXCEPTION **
>
> tolong bantuin donk, apa ada yang harus di setting pada mysql standart
> bawaan dari mandriva...? ???
>
> thanks before.....
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

Badi Hrp
In reply to this post by mujib Ziq
Btw, service mysql nya dah jalan blum ?
kemungkinan sih itu...

mujib Ziq wrote:

>
> gw udah instal netbeans di linux (mandriva 2007), udh gw tambahin
> driver, tapi pas gw cb konek ke database mysql pake netbeans muncul
> erorr :
>
> com.mysql.jdbc.CommunicationsException: Communications link failure
> due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: java.net.ConnectException: Connection refused
>
> null
> STACKTRACE:
>
> java.net.SocketException: java.net.ConnectException: Connection refused
> at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
> at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
> at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
> at java.sql.DriverManager.getConnection(DriverManager.java:582)
> at java.sql.DriverManager.getConnection(DriverManager.java:185)
> at Prog.MDIUtama.testDriver(MDIUtama.java:910)
> at Prog.MDIUtama.Login(MDIUtama.java:879)
> at Prog.MDIUtama.BtnLoginActionPerformed(MDIUtama.java:829)
> at Prog.MDIUtama.access$200(MDIUtama.java:28)
> at Prog.MDIUtama$3.actionPerformed(MDIUtama.java:154)
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
> at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
> at java.awt.Component.processMouseEvent(Component.java:6038)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
> at java.awt.Component.processEvent(Component.java:5803)
> at java.awt.Container.processEvent(Container.java:2058)
> at java.awt.Component.dispatchEventImpl(Component.java:4410)
> at java.awt.Container.dispatchEventImpl(Container.java:2116)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
> at java.awt.Container.dispatchEventImpl(Container.java:2102)
> at java.awt.Window.dispatchEventImpl(Window.java:2429)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
>
> ** END NESTED EXCEPTION **
>
> tolong bantuin donk, apa ada yang harus di setting pada mysql standart
> bawaan dari mandriva...????
>
> thanks before.....
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

mujib Ziq
In reply to this post by Ahmad Satiri
service nya udh jln, passwordnya udh gw kasih  ttp muncul erorr
java.net.ConnectExc eption: Connection refused.
-- > cek di /etc/my.cnf pastiin enable_networking nya on. (defaultnya
disable)
blom gw tes sih....
ntar deh gw coba., thanks ...


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

sayed muchallil
In reply to this post by mujib Ziq
kayaknya kalau connection refuse biasanya mysql(servisnya) belum jalan.
yup setuju dengan pendapat mas Badi

On Feb 11, 2008 1:33 PM, mujib Ziq <[hidden email]> wrote:

>   gw udah instal netbeans di linux (mandriva 2007), udh gw tambahin
> driver, tapi pas gw cb konek ke database mysql pake netbeans muncul
> erorr :
>
> com.mysql.jdbc.CommunicationsException: Communications link failure
> due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: java.net.ConnectException: Connection refused
>
> null
> STACKTRACE:
>
> java.net.SocketException: java.net.ConnectException: Connection refused
> at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java
> :156)
> at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
> at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
> at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
> at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
> :266)
> at java.sql.DriverManager.getConnection(DriverManager.java:582)
> at java.sql.DriverManager.getConnection(DriverManager.java:185)
> at Prog.MDIUtama.testDriver(MDIUtama.java:910)
> at Prog.MDIUtama.Login(MDIUtama.java:879)
> at Prog.MDIUtama.BtnLoginActionPerformed(MDIUtama.java:829)
> at Prog.MDIUtama.access$200(MDIUtama.java:28)
> at Prog.MDIUtama$3.actionPerformed(MDIUtama.java:154)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java
> :1995)
> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java
> :2318)
> at javax.swing.DefaultButtonModel.fireActionPerformed(
> DefaultButtonModel.java:387)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
> BasicButtonListener.java:236)
> at java.awt.Component.processMouseEvent(Component.java:6038)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
> at java.awt.Component.processEvent(Component.java:5803)
> at java.awt.Container.processEvent(Container.java:2058)
> at java.awt.Component.dispatchEventImpl(Component.java:4410)
> at java.awt.Container.dispatchEventImpl(Container.java:2116)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
> at java.awt.Container.dispatchEventImpl(Container.java:2102)
> at java.awt.Window.dispatchEventImpl(Window.java:2429)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(
> EventDispatchThread.java:273)
> at java.awt.EventDispatchThread.pumpEventsForFilter(
> EventDispatchThread.java:183)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(
> EventDispatchThread.java:173)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
>
> ** END NESTED EXCEPTION **
>
> tolong bantuin donk, apa ada yang harus di setting pada mysql standart
> bawaan dari mandriva...????
>
> thanks before.....
>  
>


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

Ahmad Satiri
Bukan cuma service yang harus dicek.
kalo diwindows emang bener, cuman service aja yang harus dicek.
windows cuma kenal ip based connection.

kalo di linux koneksinya dengan socket, juga karena dengan network
dianggap bahaya.
makanya secara default koneksi yang digunakan adalah koneksi socket ,
bukan dengan network

kalo udah begini, biar firewallnya dioff , mysql gak bakalan bisa
diakses dari komputer lain.


Satiri

sayed muchallil wrote:
>
> kayaknya kalau connection refuse biasanya mysql(servisnya) belum jalan.
> yup setuju dengan pendapat mas Badi
>
> On Feb 11, 2008 1:33 PM, mujib Ziq <mr.ziqboer@gmail. com
> <mailto:mr.ziqboer%40gmail.com>> wrote:
>

Reply | Threaded
Open this post in threaded view
|

Re: ngak bisa akses Mysql

mujib Ziq
>> cek di /etc/my.cnf pastiin enable_networking nya on. (defaultnya disable)
>> buat user baru+password, sepengalaman gw , kalo pake password kosong
     jdbc gak mau connect ke mysql.

udh  gw tes tp nga mau jg...
eh  ada nya udah nyabo pake fedora core 8 nga...
gw udh instal, tp pas gw tes pake netbeans 6 di fedora dan gw tes bikin
aplilasi masterdetaildatabase nya
ada pesan errorr pas gw jalani..

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException:
An exception occured while creating a query in EntityManager
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(
EntityManagerImpl.java:209)
        at Prog.MasterForm.initComponents(MasterForm.java:32)
        at Prog.MasterForm.<init>(MasterForm.java:16)
        at Prog.MDIUtama.DataMenuItemActionPerformed(MDIUtama.java:848)
        at Prog.MDIUtama.access$700(MDIUtama.java:28)
        at Prog.MDIUtama$8.actionPerformed(MDIUtama.java:281)
        at javax.swing.AbstractButton.fireActionPerformed(
AbstractButton.java:2013)
        at javax.swing.AbstractButton$Handler.actionPerformed(
AbstractButton.java:2336)
        at javax.swing.DefaultButtonModel.fireActionPerformed(
DefaultButtonModel.java:405)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java
:260)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:375)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
BasicMenuItemUI.java:1689)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
BasicMenuItemUI.java:1733)
        at java.awt.Component.processMouseEvent(Component.java:6100)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
        at java.awt.Component.processEvent(Component.java:5865)
        at java.awt.Container.processEvent(Container.java:2110)
        at java.awt.Component.dispatchEventImpl(Component.java:4461)
        at java.awt.Container.dispatchEventImpl(Container.java:2168)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java
:4466)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java
:4130)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4060)
        at java.awt.Container.dispatchEventImpl(Container.java:2154)
        at java.awt.Window.dispatchEventImpl(Window.java:2555)
        at java.awt.Component.dispatchEvent(Component.java:4287)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(
EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(
EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java
:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
Caused by: Exception [TOPLINK-8034] (Oracle TopLink Essentials - 2.0 (Build
b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Error compiling the query [SELECT t FROM Tipetv t].
Unknown abstract schema type [Tipetv].
        at
oracle.toplink.essentials.exceptions.EJBQLException.unknownAbstractSchemaType
(EJBQLException.java:494)
        at
oracle.toplink.essentials.internal.parsing.ParseTreeContext.classForSchemaName
(ParseTreeContext.java:163)
        at
oracle.toplink.essentials.internal.parsing.SelectNode.getClassOfFirstVariable
(SelectNode.java:366)
        at
oracle.toplink.essentials.internal.parsing.SelectNode.getReferenceClass(
SelectNode.java:354)
        at
oracle.toplink.essentials.internal.parsing.ParseTree.getReferenceClass(
ParseTree.java:463)
        at
oracle.toplink.essentials.internal.parsing.ParseTree.adjustReferenceClassForQuery
(ParseTree.java:103)
        at
oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateReadQueryInternal
(EJBQLParseTree.java:127)
        at
oracle.toplink.essentials.internal.parsing.EJBQLParseTree.populateQuery(
EJBQLParseTree.java:108)
        at
oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery
(EJBQueryImpl.java:219)
        at
oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery
(EJBQueryImpl.java:189)
        at
oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery
(EJBQueryImpl.java:153)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl
.<init>(EJBQueryImpl.java:114)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl
.<init>(EJBQueryImpl.java:99)
        at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(
EJBQueryImpl.java:86)
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(
EntityManagerImpl.java:204)
        ... 33 more

ada yang tau nga paan ni masalahnya...
thansk....


[Non-text portions of this message have been removed]