NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

I can't connect to the local mysql server

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
skiabox



Joined: 23 Jun 2010
Posts: 11

PostPosted: Tue Nov 15, 2011 2:49 pm    Post subject: I can't connect to the local mysql server Reply with quote

I am receiving the folllowing message after registering local mysql server
and trying to connect to it :

Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException:
orh.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: null,
message from server: "Host '192.168.0.15' is not allowed to connect to this
MySQL server".

The server may not be running or your MySQL connection properties may not be
set correctly.

My message :
(The server is running and the settings are ok)

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994462.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Javier Ortiz
Posted via mailing list.





PostPosted: Tue Nov 15, 2011 2:59 pm    Post subject: I can't connect to the local mysql server Reply with quote

Can you share your connection URL? Does the user used to connect has privileges for that host? That sounds like the issue to me. Try connecting with the root account. If it works is an issue with the privileges of the user you are using.



Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: address-removed

-----Original Message-----
From: skiabox [mailto:address-removed]
Sent: Tuesday, November 15, 2011 8:46 AM
To: address-removed
Subject: [nbusers] I can't connect to the local mysql server

I am receiving the folllowing message after registering local mysql server
and trying to connect to it :

Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException:
orh.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: null,
message from server: "Host '192.168.0.15' is not allowed to connect to this
MySQL server".

The server may not be running or your MySQL connection properties may not be
set correctly.

My message :
(The server is running and the settings are ok)

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994462.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
**********

The information contained in this e-mail message, together with any
attachments thereto, is intended only for the personal and confidential
use of the addressee named above. The message and the attachments
are or may be privileged or protected communication. If you are not the
intended recipient of this message, or authorized to receive it for the
intended recipient, you have received this message in error, and you
are not to review, use, disseminate, distribute or copy this message,
any attachments thereto, or their contents. If you have received this
message in error, please immediately notify us by return e-mail
message, and delete the original message.

Pursuant to Circular 230 issued by the United States Treasury
Department and relating to practice before the Internal Revenue
Services, any comment or opinion in this communication relating to a
federal tax issue is not intended to be used, and cannot be used, by a
taxpayer for the purpose of avoiding tax-related penalties that may be
imposed on the taxpayer.
Back to top
DiRaven



Joined: 17 Jul 2011
Posts: 10

PostPosted: Tue Nov 15, 2011 3:02 pm    Post subject: I can't connect to the local mysql server Reply with quote

On 11/15/2011 05:46 PM, soapbox wrote:
Quote:
I am receiving the folllowing message after registering local mysql server
and trying to connect to it :

Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException:
orh.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: null,
message from server: "Host '192.168.0.15' is not allowed to connect to this
MySQL server".

The server may not be running or your MySQL connection properties may not be
set correctly.

My message :
(The server is running and the settings are ok)

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994462.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.


Read the error info carefully:
Host '192.168.0.15' is not allowed to connect to this MySQL server

Are you sure your host is allowed to connect to this mysql server?
--
Best regards,
DiRaven
Back to top
skiabox



Joined: 23 Jun 2010
Posts: 11

PostPosted: Tue Nov 15, 2011 3:06 pm    Post subject: I can't connect to the local mysql server Reply with quote

Username is 'root' and password is 'root'
I have set the root password by loging in as root in the terminal window and
then flushing privileges and restart mysqld.

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994533.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
skiabox



Joined: 23 Jun 2010
Posts: 11

PostPosted: Tue Nov 15, 2011 3:09 pm    Post subject: I can't connect to the local mysql server Reply with quote

This message is haunting me from yesterday.
I even set mysqld to accept connections from all but no result.
Today I completely uninstalled netbeans and mysql from macos (I even erased
.netbeans folders from home directory) and installed them again.
I really can't see where is the problem so I decided to make a post.

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994548.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Javier Ortiz
Posted via mailing list.





PostPosted: Tue Nov 15, 2011 3:48 pm    Post subject: I can't connect to the local mysql server Reply with quote

Can you connect using MySQL command prompt? If not you did something wrong.



Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: address-removed


-----Original Message-----
From: skiabox [mailto:address-removed]
Sent: Tuesday, November 15, 2011 9:07 AM
To: address-removed
Subject: [nbusers] Re: I can't connect to the local mysql server

This message is haunting me from yesterday.
I even set mysqld to accept connections from all but no result.
Today I completely uninstalled netbeans and mysql from macos (I even erased
.netbeans folders from home directory) and installed them again.
I really can't see where is the problem so I decided to make a post.

--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994548.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
**********

The information contained in this e-mail message, together with any
attachments thereto, is intended only for the personal and confidential
use of the addressee named above. The message and the attachments
are or may be privileged or protected communication. If you are not the
intended recipient of this message, or authorized to receive it for the
intended recipient, you have received this message in error, and you
are not to review, use, disseminate, distribute or copy this message,
any attachments thereto, or their contents. If you have received this
message in error, please immediately notify us by return e-mail
message, and delete the original message.

Pursuant to Circular 230 issued by the United States Treasury
Department and relating to practice before the Internal Revenue
Services, any comment or opinion in this communication relating to a
federal tax issue is not intended to be used, and cannot be used, by a
taxpayer for the purpose of avoiding tax-related penalties that may be
imposed on the taxpayer.
Back to top
skiabox



Joined: 23 Jun 2010
Posts: 11

PostPosted: Tue Nov 15, 2011 4:09 pm    Post subject: I can't connect to the local mysql server Reply with quote

An old trick fixed the things.
I used 127.0.0.1 instead of localhost.
Do you believe that it has something to do with my hosts file?

Lines that contain localhost :

127.0.0.1 localhost
::1 localhost
fe80::1%lo0 localhost


--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql-server-tp4994462p4994714.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Jonathan Spooner
Posted via mailing list.





PostPosted: Tue Nov 15, 2011 7:37 pm    Post subject: I can't connect to the local mysql server Reply with quote

Hello skiabox,

To determine if your host file is properly configured you can ping
"localhost" and if you get a response then it _is_ properly configured.

-----Original Message-----
From: skiabox [mailto:address-removed]
Sent: November 15, 2011 7:56 AM
To: address-removed
Subject: [nbusers] Re: I can't connect to the local mysql server

An old trick fixed the things.
I used 127.0.0.1 instead of localhost.
Do you believe that it has something to do with my hosts file?

Lines that contain localhost :

127.0.0.1 localhost
::1 localhost
fe80::1%lo0 localhost


--
View this message in context:
http://netbeans-org.1045718.n5.nabble.com/I-can-t-connect-to-the-local-mysql
-server-tp4994462p4994714.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Andreas Ernst
Posted via mailing list.





PostPosted: Wed Nov 16, 2011 11:19 am    Post subject: I can't connect to the local mysql server Reply with quote

Am 15.11.2011 15:46, schrieb skiabox:
Quote:
I am receiving the folllowing message after registering local mysql server
and trying to connect to it :

Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException:
orh.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: null,
message from server: "Host '192.168.0.15' is not allowed to connect to this
MySQL server".

Check the sql table users from MySQL. The issue is that you can select
from which host you can connect to MySQL, normally localhost - for
server databases. But if you want connect from a different IP, you need
to grant the priviliges also to the host, i.e.

GRANT ALL PRIVILEGES ON `<database>` . * TO '<user>'@'localhost';

You have to change this to:

GRANT ALL PRIVILEGES ON `<database>` . * TO '<user>'@'192.168.0.15';
flush privileges;

For my testing(!) environment, i use:

GRANT ALL PRIVILEGES ON `<database>` . * TO '<user>'@'%';
(all hosts are allowed)

This should help.
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
address-removed | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo