Support Questions

Find answers, ask questions, and share your expertise

Exception in thread "main" java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user 'registry'@'localhost' (using password: NO)

avatar

I'm installing Hortonworks schema registry and after mysql setup, I configured registry.yaml with the id and password. After running

./bootstrap/bootstrap-storage.sh

I'm getting error:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #000000; background-color: #171717; background-color: rgba(23, 23, 23, 0.6)} span.s1 {font-variant-ligatures: no-common-ligatures} span.Apple-tab-span {white-space:pre}

Thu Jan 10 11:05:35 IST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Exception in thread "main" java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user 'registry'@'localhost' (using password: NO)

at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:130)

at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101)

at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:91)

at org.mariadb.jdbc.Driver.connect(Driver.java:109)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at com.hortonworks.registries.storage.tool.SQLScriptRunner.connect(SQLScriptRunner.java:75)

at com.hortonworks.registries.storage.tool.SQLScriptRunner.runScript(SQLScriptRunner.java:90)

at com.hortonworks.registries.storage.tool.TablesInitializer.doExecute(TablesInitializer.java:198)

at com.hortonworks.registries.storage.tool.TablesInitializer.doExecuteCreate(TablesInitializer.java:175)

at com.hortonworks.registries.storage.tool.TablesInitializer.main(TablesInitializer.java:162)

Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not connect: Access denied for user 'registry'@'localhost' (using password: NO)

at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authentication(AbstractConnectProtocol.java:566)

at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.handleConnectionPhases(AbstractConnectProtocol.java:507)

at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:392)

at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:811)

at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:469)

at org.mariadb.jdbc.Driver.connect(Driver.java:104)

... 7 more

2 REPLIES 2

avatar
Master Mentor

@Abhijeet Kumar

Have you executed the following query on your MySQL DB to grant 'registry'@'localhost' access?
Like: https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_installing-hdf-and-hdp-ppc/content/datab...

# mysql -u root -p
Enter Password: 

mysql> use mysql;
mysql> GRANT ALL PRIVILEGES ON registry.* TO 'registry'@'%' WITH GRANT OPTION ;
mysql> GRANT ALL PRIVILEGES ON registry.* TO 'registry'@'localhost' WITH GRANT OPTION ;
mysql> FLUSH PRIVILEGES;

.

avatar

yes, I tried all the above commands except

  1. mysql> GRANT ALL PRIVILEGES ON registry.* TO 'registry'@'%' WITH GRANT OPTION ;

It's showing

ERROR 1410 (42000): You are not allowed to create a user with GRANT