WordPress op een Synology

Installing/Reinstalling phpMyAdmin & mySQL

Since there seems to be no instructions on how to do this and most of the ‘advice’ here is for folks clearly more intelligent than I, I thought I’d post my experience in installing/reinstalling phpMyAdmin and mySQL so that, hopefully, newbies like me won’t be as frustrated as I have been.

I want to set up some test WordPress sites which requires three elements: web server, mySQL database and phyMyAdmin to administer the mySQL database. I have set up MAMP on my local MacPro, so I know how to do that, but the Synology box is a bit different.

In my case, I had set some of this up months ago and, embarrassingly, forgot what the heck I did. So I figured I’d start fresh. That was a big mistake. So I’ll go through initial setup and then how to ‘fix’ things if you screw them up like I did.

—Web Services and mySQL—
You have to turn that on first. You access that in the Control Panel –> Network Services –> Web Services

Check the box to ‘Enable Web Station’

If you want to set up more than one installation of WordPress or configure multiple websites, you’ll need to configure the ‘Virtual Host’ button under the ‘Enable Web Station’ link. When I configured mine, I made the subfolder name and hostname the same. I’m going to configure my network DNS to accomodate accessing the sites better than <<ip_address>>/<<subfolder_name>>/index.php – but that will be a separate post in another section.

Apache web server is pretty cool (I found out when my Apple XServer) in that all you need to do is some minimal configuration for virtual websites and Apache keeps everything straight when folks attempt to access them.

Enabling Web Station creates a folder at the root of your DiskStation directory called ‘web’. Creating Virtual Hosts creates subfolders inside of the ‘web’ folder. If you are going to have multiple WordPress installations (or just plain ole HTML sites), each subfolder will have to have WP installed in them. You can do that from the Package Center –> Business; but if you do, it will install WP into the root ‘web’ folder. If you are only going to do a single WP installation, that might be OK for you.

In my case, I downloaded the WP package (currently 3.5.1), unpacked it, and copied it to each of my subfolders.

Before you run the WP install, you need to add the database that WP will use to your mySQL database.

—phpMyAdmin—
You can do that through phpMyAdmin from the Package Center –> Utilities. No matter how many installs of WP you have or how many databases, you will only have one install of mySQL and one install of phpMyAdmin.

—Creating mySQL Databases—
Creating a database in mySQL is easy. Start up phpMyAdmin (after it’s installed) and click on the ‘Databases’ tab at the top of the page. In the window under ‘Create database’, type in the name of the database and click the ‘Create’ button. You will see the name of the database show up in the Database list. I just named my databases the same as the subfolders I created for my multiple WP installs.

Oh yeah, the default username and password for your mySQL database is ‘root’ and NO password. (That is, a blank password). You need to change that immediately. You can do that in the users tab. I saw three ‘root’ users, so I changed all three passwords to the same password. You can use the password generator to create a very secure password and I would encourage you to do that.

That’s really all there is to it. I’m not going to get into installing WP and how to do that; but I will if there is interest, because there are some idiosyncrasies with the Synology box I did not experience with MAMP.

!!IF YOU SCREW UP!!

OK – here’s what I wish had been posted so I wouldn’t have wasted most of yesterday fiddling and futzing around the forum looking for an answer that wasn’t there.

What I did find was how to reset your mySQL password. But I wanted to delete everything and start all over again. I couldn’t find my old passwords and couldn’t get access to phpMyAdmin.

Basically, you reverse everything you do during the install.

—UNINSTALL phpMyAdmin—
Go to the Package Center – click on Utilities (DSM 4.2) – open PMA – click on the ‘Action’ Button and select Stop, then select Uninstall. (It’s possible that selecting ‘Uninstall’ will automatically stop the utility, but I think it’s safer to stop it first, then uninstall it.)

—UNINSTALL mySQL—
Now you have to get rid of mySQL. Go to the Control Panel –> Web Applications (tab) and UNCHECK ‘Enable’ MySQL. Click the ‘Apply’ button. You can leave ‘Enable Web Station’ checked and you can leave your Virtual Hosts alone. Clicking the Apply button is necessary in order to, effectively, uninstall mySQL.

—REINSTALL mySQL—
Now you can click on ‘Enable MySQL’ (and click ‘Apply’) which will reinstall the package with a new default username and password.

Maybe this seems intuitive, but I sure as heck didn’t think so. I hope this has been helpful.

Op dit artikel kan niet (meer) gereageerd worden.