gwnp
gwnp

Reputation: 1216

AWS ec2 WordPress powered by Bitnami instance mysql password

I set up an ec2 instance via the AWS Marketplace "WordPress powered by Bitnami" image. The setup was simple and painless, I was able to log in, change the users passwords etc. I was able to ssh into the box via the ubuntu user and that was fine.

Then came mysql, I wanted to ensure I could log into the database in order to provide backups, in-case an investigation needed to be done etc. For the life of me and from Google, I could not seem to log in. Furthermore, the usual "reset root password" methodologies for MySql do not appear to work with this image, they spit out errors.

Does anyone know the default password for the MySql portion of this image?

Some of the usersnames I've tried: root, ubuntu, bitnami, {wordpress username}

Passwords I've tried with the above usernames: "", mysql, bitnami, {wordpress password}

And quite a few others over the past 2 days. As stated above, usually when you want to reset the root password you can run mysqld in safe mode and change it or run mysql_secure_installation but I receive errors such as this (tried as myself and also root):

2016-11-09T19:31:09.279114Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-09T19:31:09.279195Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2016-11-09T19:31:09.279221Z 0 [Note] /opt/bitnami/mysql/bin/mysqld.bin (mysqld 5.7.16) starting as process 6459 ...
2016-11-09T19:31:09.281916Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2016-11-09T19:31:09.282111Z 0 [ERROR] Aborting

2016-11-09T19:31:09.282164Z 0 [Note] Binlog end
2016-11-09T19:31:09.282219Z 0 [Note] /opt/bitnami/mysql/bin/mysqld.bin: Shutdown complete

I'm about to delete the image and install everything myself but I figured someone must know it.

Upvotes: 1

Views: 1706

Answers (1)

gwnp
gwnp

Reputation: 1216

Ugh, there's an error in their documentation, they say to run this:

sudo /opt/bitnami/mysql/bin/mysqld_safe --defaults-file=/opt/bitnami/mysql/my.cnf --pid-file=/opt/bitnami/mysql/data/mysqld.pid --datadir==/opt/bitnami/mysql/data --init-file=/home/bitnami/mysql-init 2> /dev/null &

But the datadir arg has an extra equals sign, the command should be:

sudo /opt/bitnami/mysql/bin/mysqld_safe --defaults-file=/opt/bitnami/mysql/my.cnf --pid-file=/opt/bitnami/mysql/data/mysqld.pid --datadir=/opt/bitnami/mysql/data --init-file=/home/bitnami/mysql-init 2> /dev/null &

Upvotes: 1

Related Questions