First, you have to find out where the password locates.
https://gist.github.com/mrmichalis/5984131
I ran these on which Cloudera Manager locates.
1 2 3 |
cat /var/lib/cloudera-scm-server-db/data/generated_password.txt; cat /etc/cloudera-scm-server/db*.properties | sed '/^#/ d'; |
1 2 3 4 5 6 7 |
# cat /var/lib/cloudera-scm-server-db/data/generated_password.txt; MyP4ssw0rd The password above was generated by /usr/share/cmf/bin/initialize_embedded_db.sh (part of the cloudera-manager-server-db package) and is the password for the user 'cloudera-scm' for the database in the current directory. Generated at 20140101-000000. |
The cloudera-scm is the superuser.
And the first line in that file is the password.
To drop a database, dropdb is the command:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# dropdb --help dropdb removes a PostgreSQL database. Usage: dropdb [OPTION]... DBNAME Options: -e, --echo show the commands being sent to the server -i, --interactive prompt before deleting anything --help show this help, then exit --version output version information, then exit Connection options: -h, --host=HOSTNAME database server host or socket directory -p, --port=PORT database server port -U, --username=USERNAME user name to connect as -w, --no-password never prompt for password -W, --password force password prompt Report bugs to <pgsql-bugs@postgresql.org>. |
Commands may like:
1 |
dropdb -U cloudera-scm -p 7432 -h cm.myhost.com DBNAME |
To drop a user, using dropuser:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# dropuser --help dropuser removes a PostgreSQL role. Usage: dropuser [OPTION]... [ROLENAME] Options: -e, --echo show the commands being sent to the server -i, --interactive prompt before deleting anything --help show this help, then exit --version output version information, then exit Connection options: -h, --host=HOSTNAME database server host or socket directory -p, --port=PORT database server port -U, --username=USERNAME user name to connect as (not the one to drop) -w, --no-password never prompt for password -W, --password force password prompt Report bugs to <pgsql-bugs@postgresql.org>. |
Commands may like:
1 |
dropuser -U cloudera-scm -p 7432 -h cm.myhost.com USERNAME |
Cloudera Manager Drop Database/User on Embedded Postgresql by : https://sskaje.me/2014/04/cloudera-manager-drop-databaseuser-embedded-postgresql/
Incoming search terms:
- cloudera initialize_embedded_db sh
- Failed to start LSB: Cloudera SCM Server\s Embedded DB
- cloudera how to connect to embedded postgres database
- cloudera manager postgresql port
- cloudera postgres embeded super user
- cloudera postgres password
- how to connect to cloudera postgres database
- show cloudera director server version
Link to this post!