Question

Default Root password for MySql wont work

Posted January 13, 2015 7.2k views

Hi, I just created a new droplet and used the “LEMP on Ubuntu 14.04” application to set it all up and have LEMP installed automatically. I am trying to run “sudo mysqlsecureinstallation” for obvious reasons and it is asking me for the root password. I tried entering the password that is given on startup:

The details of your PHP installation can be seen at http://xxx.xxx.xxx.xxx/info.php  
Your MySQL root user's password is XXXXXXXXXX  You are encouraged to run 
mysql_secure_installation to ready your server for production.  

But it will not work! The error msg is:
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: YES)

Any help would be appreciated.

3 comments
  • Try the following to reset your password

    sudo mysqladmin password newPwHereButDontUseThisPw
    

    This will reset to the new password

  • Nope. Did not work. Error msg is:

    Access denied for user ‘root’@'localhost’ (using password: NO)

  • @Maricruz - How are you trying to sign in to mysql? For example, on the command line I use this:

    somebody@yourhost:~# mysql -u root -p
    

    The “Enter password:” prompt appears, I enter the password I was given or that I changed to, then do a quick sanity check:

    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    +--------------------+
    3 rows in set (0.00 sec)
    

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi,

The below tutorial can assist you with setting up LEMP on ubuntu 14:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

You can also feel free to check digitalocean LEMP from the marketplace.

https://marketplace.digitalocean.com/apps/lemp

Regards,
Rajkishore

by Justin Ellingwood
A LEMP stack (Linux, Nginx, MySQL, and PHP) is a powerful set of software that can be configured to serve dynamic sites and web apps from your server. In this guide, we will discuss how to install a LEMP stack on an Ubuntu 14.04 server.