Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3724

Problem with MySQL Worckbench and NetBeans (no replies)

$
0
0
I'm with a doubt about the configuration of the workbench and the other for a problem that does generate the database created in Worckbench work in Netbeans.
I followed the steps of the tutorial to create a New Server Stance.
and when I create a connection localhost, Standard (TCP / IP), port:3306
I present these errors and I can not make the connection:

Could not connect to MySQL server:
Can't connect to MySQL server on '127.0.0.1' (61)
You may continue if the server is simply not running.

I tried to create the Manage Server Instances, the standard way type system (Mac OS) and Mac OS X Installation type (MySQL package).

The only way I could get access to MySQL was by using a link on which I have MAMP installed.

I configured on Manage Server Instances in System Profile option so customized in this way:

Instance Profile Name: SQLiteManager@localhost

Configuration File: /Applications/MAMP/conf/SQLiteManager/config.db
Configuration File Section: SQLiteManager

Start MySQL:/Applications/MAMP/bin/startMysql.sh
Stop MySQL: /Applications/MAMP/bin/stopMysql.sh

I choose the option: Elevate privileges to execute start/stop commands and write configuraton data

Check MySQL Status: Applications/MAMP/bin/checkMysql.sh
Sudo command:/usr/bin/sudo -p EnterPasswordHere /bin/sh -c

When I did this I managed to create in New Server Instance a database connection:
connection Name: localhost
Connection Method: Local Socket/Pipe
Socket/Pipe Path: /Applications/MAMP/tmp/mysql/mysql.sock
Username: root

From there I can work in WorkBench, so I created a simple schema and table.
I created an ERR Model (usuarios).
Edited data in the table that I created and realized that the data is being sent, I have seen the MySQL server MAMP values ​​added.

I want to know why can not I create a New Server Instance without MAMP?
because I can not access the port 3306?

And I have a problem when I use the database in NetBeans me the following error appears:


Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:348)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2391)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2428)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2213)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:797)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:243)
at capadatos.GestorBD.conectar(GestorBD.java:56)
at capanegocio.GestorUsuarios.obtenerUsuarios(GestorUsuarios.java:29)
at capanegocio.ControlUsuarios.main(ControlUsuarios.java:29)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:298)
... 17 more


I think it's because of jdbc 4 conecctor, and I installed on library the new jdbc 5.1.20 connector but I see that is not being accessed.

I am using the following url and accessDriver:

private String url="jdbc:mysql://localhost:8889/dbjuego";
private String accessDriver = "com.mysql.jdbc.Driver";

can anyone help me?

Viewing all articles
Browse latest Browse all 3724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>