adrian's picture
i have problems with mysql password on the turnkey linux images. AMI: turnkey-wordpress-11.2-lucid-x86.ebs (ami-97b077fe) here is the prompt. mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) i changed passwords on login, as suggested in the following document. http://www.turnkeylinux.org/updates/lamp BTW. these are images 'spun' from the AWS console, not your console. i did not get a prompt and thus root is open with blank password? further, is it the root password set in a database? or the system one. do they match? i also tried the mysqlp4ssw0rd password used in previous versions of your LAMP.
Forum: 
Tags: 
Jeremy Davis's picture

I know nothing about the AWS console and as such can't really comment on how that would all work. When launching from the TKL Hub all passwords (inc MySQL root) are preseeded prior to launch. With a TKL instance running on bare metal or local VM the first boot scripts allow you to set all passwords then, but I don't think it works like that in AWS? As you already have root access to your appliance you may be able to reset the MySQL root password by manually running the script (it works locally - not sure if it will in AWS):

/usr/lib/inithooks/bin/mysqlconf.py

Re Linux root password and access to Webmin: AFAIK if you don't set a Linux root password a random one is set and SSH access is via keypairs -  although I'm not sure if it's like that when using AWS console rather than the Hub (that's what happens if you don't set a root password on launch via the Hub). Assuming that is the case, unless you manually reset the Linux root password, it will not be possible to use Webmin (as it requires the root password to login). The Hub has a commandline/python API so once you have a Hub account you can use that to launch your instance, with passwords etc.

adrian's picture

it is a mysql issue. and the script worked fine. 

thanks for the note.

Jeremy Davis's picture

Glad you got it working. I suspect that because of the way you launched it there was no password set, but because it expected one it wouldn't run without one. Only guessing though...

As I said though, I'd highly recommend the Hub. It's too easy really!

Alon Swartz's picture

As Jeremy mentioned, when launching via the Hub, the relevant passwords (root, mysql, application, etc.) will be securely pre-seeded automatically during the instance boot.

But, when launching out of the Hub (via the AWS console / ec2 api), the instance will fall back to randomizing passwords for security. The root and database password will be the same for convenience, and can be pulled out of the instance boot log if required - alternatively you can ssh using the keypair set on launch and manually change the passwords.

The Hub will also setup a security group automatically for you, so don't forget to do it manually if you are going it alone.

Is there any reason you are opting not to use the Hub?

Jeremy Davis's picture

As I've never used vanilla AWS (only ever used through the Hub) I can't be sure. But one way I'm pretty sure would work is to use TKLBAM to migrate to a new server launched via the Hub. Obviously don't kill your original server until you are 100% sure all is as it should be (to avoid risk of data loss or something else going wrong) but I would imagine that it should be trouble free.

Add new comment