Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Ok, I recently got interested in making my mac a server, maybe for a blog. I used DynDns for a free domain name, that will always resolve to my current IP, updated with the DynDns Updater application I downloaded. I reserved my local IP, so DHCP will always assign the same local IP to my mac. I port-forwarded port 80 on the router to my mac. I symlinked /Library/WebServer/Documents to point to /Users/me/Sites/, so that I could put stuff in there instead.

I found Wordpress, a free open source blogging engine, so I decided to try that. I found instructions, and activated PHP (in /etc/apache2/httpd.conf). A test php file succeeded. I also created php.ini, and changed some warning thing and the time zone.

Then I donwloaded MySQL (mysql-5.1.39-osx10.5-x86_64), which I believe is for 64-bit intel (by the way, I'm on Snow Leopard). Here's where I got confused. These are the instructions I've been following, the spot where I am right now. I'm not really sure how to make the mysql admin, which It kind of mentions you need before you can make the user and the database. Any help? Thanks.

Also, what is the database for? Does it store all the entries and comments on the blog?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

If you are not experienced in this area, a good new-user-friendly solution is MAMP. (One especially nice thing about MAMP is that the versions of PHP on OSX (and MySQL on an OSX server) are not necessarily the ones you would choose, if you could. MAMP's versions are more up-to-date and I believe enable more modules for PHP.)

It's dead easy to install and use, with excellent documentation. You should, however, make sure to set a secure password before using it as a proper (externally visible) server.

To answer another question, WordPress uses MySQL to store posts, comments, users and more. The database is, in a way, the real heart of the blog. The rest is mostly interchangeable templates to style the content. (That's an exaggeration I suppose. The PHP takes all the raw data in the database and turns it into a blog, rather than a heap.)

Edit: those instructions that you refer to assume that you already have a working MySQL installation. It sounds like you don't. If you want to go the more complex route, you first need to give the root user of your MySQL installation a password (a very secure one) and then create a second user (with fewer privileges than root) to own the WordPress database. Again, if you've never used MySQL, I wouldn't necessarily recommend that you do this all. At the least, you should read up a bit on how to set-up and administer MySQL. Here's a link: Getting Started with MySQL.

share|improve this answer
But how do I create this MySQL admin? –  Mk12 Oct 17 '09 at 18:03
Or on that page I linked to, could you post it but edit it the placeholders to have what they should have? What am I supposed to type where it says adminusername? –  Mk12 Oct 17 '09 at 18:07
@Mk12: the default adminusername for a MySQL installation is root. Did you set a password for root during installation? –  Telemachus Oct 17 '09 at 18:10
and on the MAMP website it says its not meant for a live web server, to use the built in one for that. –  Mk12 Oct 17 '09 at 18:10
@Mk12: Actually, have you even started MySQL? Is the service running? (You should really look at MAMP. It simplifies things a lot.) –  Telemachus Oct 17 '09 at 18:10

Use PHPMyAdmin for working with MySQL databases; I use it all the time on OS X.

Two good sites on installing, starting and running MySQL in OS X are Hivelogic and Entropy.

share|improve this answer

I suspect the problem that you may be having is that mysql isn't in the path for the user that you're using to set-up your database with. If you specify the full patch and use the default admin user your command line should look something like

/usr/local/mysql/bin/mysql -u root -p

It should then prompt you for the password for your root account. It's also possible MySQL may not be set to run at startup on your mac. If it's not starting automatically, you can start it from the command line using the following

sudo /usr/local/mysql/bin/mysqld_safe &

There is a great GUI client available for OS X called CocoaMySQL which I'd recommend especially if you're new to MySQL, it reduces the learning curve quite a bit.

Oh, and you're spot on the database is used to store comments, and posts in the blog along with other information such as user account information and possibly a lot more (I'm not particularly familiar with Wordpress so not sure what the 'lot more' might be). Get it set-up without the intention of using it full time and just use it to experiment, learn your way around the database for a while and you can discover most of what the database is used for yourself :)

share|improve this answer
Where did you get that I couldn't find mysql executable? I already added it to the path. –  Mk12 Oct 20 '09 at 22:04
It's not mentioned in the original question and I've encountered many users having problems launching mysqladmin due to missing paths on OS X –  Mike1980 Oct 20 '09 at 22:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.