Question

How to Change MYSQL Root PASSWORD Ubuntu 14.04

  • Posted on January 3, 2015
  • GoanPavAsked by GoanPav

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 mysql_secure_installation 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.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

This comment has been deleted