- This topic has 5 replies, 4 voices, and was last updated 18 years, 5 months ago by hgari.
-
AuthorPosts
-
rstudnerParticipantI have mysql 5 running as a service on my winxp box… I can go to cmd and run mysqlshow and get the tables to appear…
I opened up myeclipse 4.1.1… went to the db explorer view..
I configured the driver, pointed to the connector/j jar)..
for the url.. I’ve tried leaving the template default.. reducing it to the minimum (since with no IP and no port it defaults to 127.0.0.1 and 3306 according to the docs).
I always get ‘unable to create connection check your URL’.
Sorry.. don’t have it in front of me to type the exact text..
I’m curious to know if it generally is ‘really easy’ to setup, and i’m just missing it haha.
rstudnerParticipantOkay.. more details: Connector/J jar is 3.1.13
New Driver
Driver Tempalate MySQL Connector/J Driver
Connection URL: jdbc:mysql://<hostname>[<:3306>]/dbnameOkay.. so the driver is in, as above.
now I am at New Database Connection Profile
profile name: mysql-jdbc
Driver: MySQL Connector/J DriverFor URL i’ve tried leaving it as above (which shouldn’t work)
i’ve tried jdbc:mysql:// (which then defaults to 127.0.0.1 and :3306 according to the docs).I have both a ‘root’ account with a password, and I even reinstalled MySQL to have the ‘anonymous account’ (thought that would help).
I still can essentially ‘never’ get myeclipse to connect to my mysql db
Any ideas :)?
Thanks.
Roger
Haris PecoMemberRoger,
If you got this message
‘unable to create connection check your URL’
then you type wrong url or your driver is too old
try use this url
jdbc:mysql://127.0.0.1:3306/test
You have to download jdbc driver from mysql (latest stable is 3.1.12) and add jar in configure driver wizard
Best
Lance DrakeMemberHi Roger,
It just may be that you have yet to perform the “GRANT ALL…” permissions statement on the database to which you want to connect.
F’rinstance – if you wish to connect as USER = roger and PASSWORD = wilco – and you’re accessing MySQL from the same machine, then you could do this <via command line>:
1) cd to the dir that has the mysql binary in it
2) Launch MySQL via the root user (mysql -u root -p)
3) Enter your password (wilco)
4) at the mysql prompt enter:GRANT ALL ON yourdatabase.* TO roger@localhost IDENTIFIED BY ‘wilco’;
or… if you were on another machine…
GRANT ALL ON yourdatabase.* TO roger@192.168.0.3 IDENTIFIED BY ‘wilco’;
5) Exit mysql (type \q at the prompt) and give the connection another try…
G’Luck!
Lance DrakeMemberHi roger… enter the ROOT password when logging in – not necessarily ‘wilco’ — THE FREAKIN’ DETAILS GET ME EVERY TIME!
hgariMemberThis message has not been recovered.
-
AuthorPosts