| View previous topic :: View next topic |
| Author |
Message |
Plotinus
Joined: 23 Nov 2008 Posts: 3
|
Posted: Sun Nov 23, 2008 12:58 pm Post subject: Unable to connect to MySQL - SOLVED |
|
|
Hi, everybody,
I am a newbie in everything and I've spent lots of time because I am not able to connect to mySQL despite of the readed posts and googling time.
I work with ubuntu 8.04 and xampp, I can connect with mysql via phpmyadmin, I can create tables, etc. I have a little php application that works fine. I reach this application by typing http://localhost/myApp/myApp.php (with no port number).
I've installed NetBeans 6.5, with no problem. I've created my first project.
But when I go to Services -> Databases, and try to connect to the server, I get an error message:
Unable to connect to the MySQL server:
org.netbeans.api.db.explorer.DatabaseException: org.netbeans.api.db.explorer.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure.
Last packet sent to the server was 0 ms ago..
The server may not be running... etc etc
And when I edit the MySQL connection properties, I get:
Server Host Name: localhost
Server Port Number: 3306 (I think it's ok, when I connect to the application I never type the port number, but in the mysql config file stays this value).
Administrator User Name: root (usually I connect to phpmyadmin with this user)
Administrator Password: ***** (the same with I connect to phpmyadmin)
I have no idea of java (needed?) and cannot figure out what happens. Sure it must be a very silly thing...
Can anybody help me? Any suggestion or help will be strongly welcome.
Thanks in advance,
P
Added:
When I right-click on Services -> Databases -> Drivers -> mySQL and put in the parms of the connection, I get another error:
Unable to add connection. Cannot establish a connection to jdbc:mysql://localhost:3306/myApp using com.mysql.jdbc.Driver (communications link failure).
Those parms are:
Data Input Mode: Field entry
Name: MySQL (connector/j driver)
host: localhost
port: 3306
database: mydatabase
user name: root
password: ***** same as above
Solution:
Thanks to the post in http://forums.netbeans.org/post-14735.html, I edited the /opt/lamm/etc/my.cnf file, and commented the line with "skip-networking". |
|
| Back to top |
|
 |
Futaleufu_John Posted via mailing list.
|
|
| Back to top |
|
 |
Plotinus
Joined: 23 Nov 2008 Posts: 3
|
Posted: Mon Nov 24, 2008 10:23 pm Post subject: Thank you! |
|
|
Thank you!
It was what I needed!
Finally the connection is working. |
|
| Back to top |
|
 |
|
|
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
|
|
|
|