lmbaptista Posted October 15, 2014 Share Posted October 15, 2014 Infrastructure: Ubuntu 14.04 / MySQL 5.6.16 (LAMPP package) / Jasper Studio 5.6.2 / Java connector 5.1.33 (independent platform).I created 2 different data adapters with "Driver classpath" filled: A) org.hsqldb.jdbcDriverB) com.mysql.jdbc.DriverWith connector A, I can connect to database, test is successful, I can see metadata, but there are no tables available. I tried a script (select * from table) but I get the message that the table does not exist or user lacks privilege. Since I'm connecting as "root" with all privileges I don't know which privileges I should have more.With connector B, apparently the most standard connector (since org.gjt.mm is "old and buggy"), when I test I get the message "com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure"In this link (http://stackoverflow.com/questions/2983248/com-mysql-jdbc-exceptions-jdbc4-communicationsexception-communications-link-fai ) I found some possible reasons for what's happening, but I checked all of them and nothing changed.I also searched the web and quite a few people had the same problem but the only answer available was that it's fixed in release 5.5 but I'm with 5.6.2 and I'm still stucked.Can someone help me this time, please? Link to comment Share on other sites More sharing options...
marianol Posted October 15, 2014 Share Posted October 15, 2014 The erros is "User Lacks Priviledges to the object" is the MySQL user you put on the data adapter able to quuery that table (i.e. GRANT SELECT)Based on the screenshot the data adapter and the driver is working the only issue is that your user cannot query that table.. Look here for infor on permissions on MySQL http://dev.mysql.com/doc/refman/5.1/en/grant.html Link to comment Share on other sites More sharing options...
lmbaptista Posted October 16, 2014 Author Share Posted October 16, 2014 Thanks for your answer. That was my first theory. However, I'm using user "root" granted with all privileges through phpmyadmin. I also created "user1" and granted all privileges (so I can skip user "root") but with this one I cannot even connect. I get an authorization error (java.sql.SQLInvalidAuthorizationSpecException: invalid specification - not found: user1 ) This is clearely a problem with grants, but I'm starting to wonder if I should use commands instead of phpmyadmin console. Or there are any other grants I need to do that are not visible? This is clearly not clear to me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now