02-03-2017 02:12 AM - edited 02-03-2017 04:06 AM
I'm guessing I somehow managed to do the same typo twice while changing the password. Tried the combinations but no luck.
CDH version is 5.5.1
There is no /var/lib/cloudera-scm-server-db folder.
Here's my /etc/cloudera-scm-server/db.properties file:
com.cloudera.cmf.db.type=mysql com.cloudera.cmf.db.host=hds01:3306 com.cloudera.cmf.db.name=scmdb com.cloudera.cmf.db.user=scm com.cloudera.cmf.db.password=scm_passwd
The host I'm on is hdsm.
I browsed for a solution and tried these:
$ psql -U scm -d scmdb
Password for user scm: scm_passwd
psql: FATAL: password authentication failed for user "scm"
$ psql -h hds01 -U scm -d scmdb
psql: could not connec to server: Connection Refused
Is the server running on host "hds01" and accepting
TCP/IP connections on port 5432?
There's mysqld up on hds01.
$ mysql -u scm -p scm_passwd -h localhost
ERROR 1045 (28000): Access denied for user 'scm'@'localhost' (using password: YES)
Every other username/password combination fails and I can't seem to connect to the DB whatsoever. I'm not able to reach anyone who knows the credentials, in fact I doubt there is anyone. What's the consequences if I stop mysql, start with skip-grant, edit user passwords, flush privileges then restart?
Appreciate any help
EDIT (SOLVED): I'm now connected to database (found out scm user is only accepted from hdsm, so installed mysql client on there) and thanks to rufusayeni's comment at this post, I solved my issue. Though, I would wanna know what if I couldn't.
02-03-2017 11:15 AM
PostgreSQL and MySQL manage host access patterens in similar ways. They control user access by not only the password they provide but also by the host(s) defined in their grants. This is not a problem which is specific to Cloudera but rather normal database management. ( As a side note if you happen to be using the embeded database for anything, even though we don't recommend it for production, you will find that it does not operate on the default PostgreSQL port of 5432. )
So long as you have the ability to access the RDBMS system as a super user you can alter user grants and host access allowances. Unfortunately if you have lost access to the RDBMS systems administrative accounts and are unable to alter user allownaces you would likely be unable to recover acess to Cloudera Manager and potentially other services.
We always recommend that database backups be created before you manually manipulate any RDBMS system outside the confines of the associated service which manages the underlying datastructures.