How Do I Uninstall And Reinstall MySQL? - DigitalOcean
Maybe your like
- Blog
- Docs
- Get Support
- Contact Sales
- Tutorials
- Questions
- Product Docs
- Cloud Chats
- Search Community
Report this
What is the reason for this report?This undefined is spamThis undefined is offensiveThis undefined is off-topicThis undefined is otherSubmit<- Back to questionsQuestionHow do I uninstall and reinstall MySQL?Posted on January 24, 2017MySQLUbuntu 16.04By macmikeal
Popular topicsI did an install of Ubuntu 16.04 Server. I installed LAMP as I did the install. I set a password for MySQL at the time. I did an install of wordpress and tried to run it and got an error message can’t connect with the database. I went into command line and MySQL is not starting up. States can’t log in with Password NO. I didn’t set NO as password. So I assume I need to uninstall MySQL and reinstall so I can put my correct password in. Any help ideas appreciated.
Submit answer (3)Add a comment (0)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 AnswerThese 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.0Thanks. This helped
apt-get purge -y mysql-* Reply0@macmikeal
Before you remove your MySQL installation, try running the following command from the CLI.
mysql_secure_installationIf a password hasn’t been set for root (for MySQL), that’ll prompt you to set a password and run you through a series of steps to help clean up and secure MySQL (basic security).
Once set, then try running the command below to restart MySQL and see if you receive an error.
service mysql restartWe can troubleshoot to see what the issue is, as long as I know what errors you’re receiving, or we can wipe the installation and start from scratch.
To remove MySQL, first you’d want to run:
apt-get remove -y mysql-*and then:
apt-get purge -y mysql-*The first command removes MySQL and associated packages while the second wipes configuration.
Reply0What I found out so far is I can’t log in as root or do anything requiring the root password. So I have got to get the Servers password to somethig I know. I even tried to log in as root from the server itself. I am gong to also need to know how to set up the database Wordpress wants. I realize that is once I can get MySQL to start which it currently will not. So as I see my steps. 1. Get the root password set to something I know. 2. Get MySQL password to what is currently in wpconfig file. 3. Make sure the database Wordpress needs is right. Any help will sure be appreciated.
ReplyLoad more answersPopular Topics
- AI/ML
- Ubuntu
- Linux Basics
- JavaScript
- Python
- MySQL
- Docker
- Kubernetes
- All tutorials
- Talk to an expert
- All tutorials
- All topic tags
Become a contributor for community
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Sign Up
DigitalOcean Documentation
Full documentation for every DigitalOcean product.
Learn more
Resources for startups and SMBs
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Learn more
Get our newsletter
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
SubmitSubmitNew accounts only. By submitting your email you agree to our Privacy Policy
The developer cloud
Scale up as you grow — whether you're running one virtual machine or ten thousand.
View all productsGet started for free
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
Get started*This promotional offer applies to new accounts only.
© 2025 DigitalOcean, LLC.Sitemap.Tag » How To Reinstall Mysql 8
-
MySQL 8.0 Reference Manual :: 2 Installing And Upgrading MySQL
-
MySQL Installation Guide
-
Ubuntu Mysql Uninstall / Reinstall - Stack Overflow
-
How To Reinstall Mysql? - Ask Ubuntu
-
Completely Uninstall OR Remove MySQL 8 From Windows 10
-
Completely Remove Or Uninstall MySQL 8 Database From Windows 11
-
How To Reinstall MySQL V5.x On Linux - NixCraft
-
How To Install MySQL 8.0 (on Windows, MacOS, Ubuntu) And Get ...
-
MySQL: Start, Stop, Uninstall & Reset Password - Academind
-
Uninstalling MySQL 8 - Packt Subscription
-
Cleanly Reinstall Mysql 8 | DirectAdmin Forums
-
Ubuntu 18.04 How To Install, Reinstall And Uninstall MySQL - Softhints
-
Reinstall MySql On Windows Server 2008 - Stison
-
Reinstall Mysql Database With Too Manny Errosr... - MariaDB