Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Getting access denied error when trying to run schema registry locally. However same creds work when i try to connect to the localhost mysql directly.

Getting access denied error when trying to run schema registry locally. However same creds work when i try to connect to the localhost mysql directly.

New Contributor

I am getting access denied error when trying to run schema registry locally. I get

bootstrap ./bootstrap-storage.sh

Using Configuration file: ./../conf/registry.yaml

Wed Jul 17 01:17:38 EDT 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 'root'@'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 'root'@'localhost' (using password: NO)


Corresponding conf/registry.yaml file config :

# MySQL based jdbc provider configuration is:

storageProviderConfiguration:

providerClass: "com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager"

properties:

db.type: "mysql"

queryTimeoutInSecs: 30

db.properties:

dataSourceClassName: "org.mariadb.jdbc.MariaDbDataSource"

dataSource.url: "jdbc:mysql://localhost/schema_registry"

dataSource.user: "root"

dataSource.password: "test1234567890"


However with the same creds im able to connect to localhost:3306 DB. Please help.


Thanks,

Karthik.