First, you have to find out where the password locates.
https://gist.github.com/mrmichalis/5984131
I ran these on which Cloudera Manager locates.
|
cat /var/lib/cloudera-scm-server-db/data/generated_password.txt; cat /etc/cloudera-scm-server/db*.properties | sed '/^#/ d'; |
|
# 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:
|
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:
|
dropuser -U cloudera-scm -p 7432 -h cm.myhost.com USERNAME |
Incoming search terms: