Hi There, I inherited a 1Click LAMP install on a droplet that was created 3 years ago. I need to move the db off the droplet for a number of reasons but I don’t know the credentials to login to mySQL or the db username and passwords.
I can access via SSH fine. I have FTP access and can view the site config files which do have the DB name and user/pass (according to wordpress) but that doesn’t seem to be working to dump.
When I log in and run
mysql -u root -p
and using passwords like ‘root’, ’ ’ & my ssh password I’m being declined.
How do I find this out? I’ve found numerous posts on this issue in Digital Ocean including those which tell me my password in included in the MOTD when I log in. Here’s my welcome screen after loggin in via SSH
root@XXX.XX.XX.XXX's password:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-150-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
251 packages can be updated.
10 updates are security updates.
New release '18.04.4 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
You have new mail.
root@neville-clients:~#
You can see password is empty. I have tried an empty password logging into mySQL without success. What can I do to access to the DB/mySQL ?
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!
Accepted Answer
Hey,
Usually with the 1-Click installs, the passwords are saved to a file when the droplet is created. Try having a look for any .password files in the root directory. I’ve just created a new droplet and the passwords are at ‘root/.digitalocean_password’ so that may be worth a try.
Hope this helps, Mike
Hello, @ScoutDigital
As per @mchlbwyr reply you need to check the file in order to obtain the MySQL credentials. You can also double check the information provided in the one-click LAMP page as well:
https://marketplace.digitalocean.com/apps/lamp
The MySQL root password is in /root/.digitalocean_password
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.