Question

How to Change MYSQL Root PASSWORD Ubuntu 14.04

Posted January 3, 2015 41.6k views

I have created Droplet and Followed on of the Tutorial to infall LAMP.

However, Please can someone help me to Change the MYSQL Root Password (XXXXXX) as Shown in the MOTD below


Thank you for using DigitalOcean’s LAMP Application.
Your web root is located at /var/www/html and can be seen from http://blah.blah.blah.blah/
The details of your PHP installation can be seen at http://1blah.blah.blah.blah/info.php
Your MySQL root user’s password is XXXXXXX

You are encouraged to run mysqlsecureinstallation to ready your server for production.

I followed this Steps,

STEP [1]
[https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-and-reset-a-root-password-in-mysql]

Following STEP[1] , I am able to Login phpmyadmin using either of the NEW Password created in STEP[1]
Or using the MOTD’s XXXXXXX

Is it Possible to Change this MOTD’s password XXXXX to something else. I thought STEP [1] would help, but unfortunately it doesn’t.

Thank you in advance.

1 comment

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.

×
3 answers

Here is what worked for me (just so you know I have installed phpmyadmin on top of mysql):

  1. type this into the terminal: mysqladmin -u root -p'oldpassword' password newpass
  2. find the motd.tail file located at /etc/motd.tail and edit it manually to reflect the new password

source 1
source 2

Now mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper
I get
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.

even though I’m connected via socket.

Submit an Answer