Question

Cleaning up my ubuntu 16.04 server after migrating database to a dedicated server.

Hello there! (:

After fiddling around for a few hours, after getting inspired by DO’s newsletter about the types of server setups that exist, I’ve decided that it’d be better to migrate the database to begin with. Especially, after I’ve read that the percona branch of mysql is proven to be a lot better suited to the application I’m running.

Long story short, there were plenty of reasons to go for a dedicated DB server now, rather than later.

Thus, I’ve tried around for a few hours and got it working.

1) I however noticed that my /etc/php folder now offers 5.6,7.0 and 7.2 “mods-available” folders, additionally to the complete 7.1 folder, which is the php version in use.

I’d like to clean those folders up but am unsure whether or not deleting these folders will break anything.

2) I still have phpmyadmin and mysql installed on my webserver. I’ve already disabled the mysql service and thus verified that the website works without the old db.

But I’m pretty sure that there are certain parts of the mysql package that are needed for my webserver to access the Database on the db server. mysql-client (?)

Some reasurrance on what is safe to delete would be highly appreciated.


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.

Accepted Answer

Just to be on the safe side, you should take a snapshot of the server as it is today. That way if you delete anything important, you can always restore back to the working snapshot.

  1. Not sure about the other versions of php

  2. PHPMyAdmin/MySQL - You can uninstall phpmyadmin from your app server, or if you still want to use it, you can update the phpmyadmin config to point at your remote mysql db. (You probably don’t have Apache/PHP installed on your database server.)

PHP connects to your MySQL database using the mysql improved extension, that works the same whether the database is on the same server or not. This means you don’t need to keep mysql installed on your app server.

This tutorial section might help give more context: https://www.digitalocean.com/community/tutorials/building-for-production-web-applications-deploying#set-up-database-server

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel