Kimmo Karhu's picture


I have launched the EC2 AMI (lamp) instance using the instructions:

I am able to make a shell connection to my instance and login as a root.

However, I am not able to connect to the mysql from the shell. If I run "mysql" I get the following error message:

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"

Is there some default password set for mysql root during the launching / installation process?

Is there any "getting started document" available for EC2 AMI lamp instance?

Thanks in advance for your help.


Alon Swartz's picture

Firstly, thanks for pointing this out. I have just updated the documentation to include the following note:

The initial root password (as well as the MySQL:root and PostgreSQL:postgres where applicable) are set randomly on firstboot for security reasons, and is available in /root/README.

BTW, we are working on a new mechanism which will make the process of launching and managing cloud instances a lot easier, as well as providing an option to configure passwords.
L. Arnold's picture

Hi Alon

For the second time I have installed/restored a Magento install to EC2, but I can't get into MYSQL:12322 with my old Password, nor is there a root/README file.

Lots of other README files but I don't know really where to link in.  This is a "build server from Hub" build, rather than "create new server, then Restore"...  in that situation I would assume I would get to specify the MySQL password.

How to get access?

L. Arnold's picture

The attempt to Migrate from a fresh install did not work (need to increase the Max Packets I am sure)... and likely also truncate some Log Files.

However, I would think that a simple  "Launch a New Server from the Hub Backup Set" should work. Twice now though I have found that the MySQL access is broken in that process.  Is that normal (I am sure it is not).  Does a different MySQL password get set than is stored in the TKLBAM data set?

Any Help is appreciated.

Jeremy Davis's picture

But I would've assumed that even when you "Launch a New Server from the Hub Backup Set" that you would still set the passwords from the Hub UI (although obviously I'm not sure).

When you say 'connect to MySQL' I assume you mean phpMyAdmin (seeing as you mention port 12322 above). If your old MySQL root password doesn't work and you didn't set one at launch then there is a way to reset it (as long as you have system root CLI access). I don't recall exactly what it is OTTOMH but if you have a google you should be able to find instructions. Still this is obviously not how it should be...

When I get a chance I'll have a look.

L. Arnold's picture

All worked that time.  I was getting a "user intervention required" but the process was pretty self explanitory.  Result was I got a "snapshot" across and duped a Server which was very helpful.

L. Arnold's picture

I will look for a way to reset the phpmyadmin access.  I had thought that it was a universal access for MySQL...  In any case that is the next step (after I install again).

Jeremy Davis's picture

But just in case I didn't (and/or someone else finds this thread looking for answers) I will post here.

You can log into phpMyAdmin with any valid MySQL user account (using the password of that account) - but you will only have the level of access that the MySQL user has. Because of that I personally like to use the MySQL root account (note this is not the Linux root user; which is used to log in to Webshell, SSH/SFTP and Webmin). If you need to reset the MySQL root account, you can do that with the firstboot script, which can be manually run with:


L. Arnold's picture

But since it may be a repetitive problem it is valuable to have repetitive answers once and a while...  Thanks for putting the Answers out so frequently and well.

I would really like to find a process to "rake knowledge" off these boards and put them into the "doc wiki" that I see forming in the Support/Documentation session.

Maybe a "Share" Button on the Forums that would post somehow to the Wiki, or some undefined Wiki Process would be in order.

Jeremy Davis's picture

Thanks for your kind words. And yes sometimes it is good to have multiple answers about the place.

As for putting stuff in the docs they are a wiki so feel free to copy paste stuff there or even just post links. I know it's not quite as quick and easy, but it's not too bad.

Add new comment