Installing and using MySQL (on Fedora 15)

I had some trouble getting basic installation of MySQL to work, so here’s a ground-up tutorial.

  1. Install mysql and mysql-server from the repositories. On Fedora, that’s ‘sudo yum install mysql’ and the same with ‘mysql-server’.
  2. To run the MySQL server, you have to run the command ‘/etc/rc.d/init.d/mysqld start’. (You may need to run this as root by prefacing with ‘sudo’.)
  3. The problem I ran into was, it was trying to use the innodb database, which is not installed by default. So you need to edit the file ‘/etc/my.cnf’. Under the section [mysqld], add the lines:
  4. Now run  ‘/etc/rc.d/init.d/mysqld start’ and it should say things are going ok. If not, you’ll have to check the error log file ‘/var/log/mysqld.log’ to see what went wrong.
  5. Now, from a terminal, run ‘mysql’. It should connect to the database you have running.  This should open up in interactive MySQL interpreter where you can enter commands like “SHOW DATABASES;”.

Installing Mercurial on Linux

Update: I’ve updated this post to focus on the steps to take in order to get mercurial working on your system, and some rough guidelines.

To install, use your installation/package manager. In Ubuntu, run:

sudo apt-get install mercurial

Now you need to set permissions. Inside your home directory, ~/, you can set up your “hgrc” (mercurial configuration file) with your username and default email address. Note that you must create and edit this file as the owner of ~/, not as root, because mercurial will only trust files that you created.  So open or create the file ~/.hgrc. Then enter the following lines:


username = My Name <>

with your name and email. Now you should be able to check out and use repositories.

Note that if you get errors about untrusted users (for example, mercurial ignores anything from “untrusted user root”, the only fix may be to edit your systems hgrc file to trust those users. The file is called /etc/mercurial/hgrc and you should add these lines to it:


users = root

Or any other users you wish to trust.

Using Mercurial

I won’t cover how to set up a Mercurial repository, because I didn’t — I just used bitbucket. To start out with a repository located at some url, use cd to navigate to the directory you want to use, then use hg clone to get a copy of a project. For example:

cd ~/my-documents/my-projects/
hg clone

Or wherever it is. Now you’re ready to start developing!  If you create a new file or folder, you must add it to the project:

hg add *

Sending and receiving updates is a two-step process. To finalize all the changes and additions you’ve made, you must commit the changes. To send that final version to the repository, you must push it.

hg commit -m 'Made some changes'
hg push

Conversely, to get the newest version from the repository, you must pull it. To change your working copy to incorporate this new version, you must updateit.

hg pull
hg update

That’s the gist of it.

Build Your Own Computer Part 4: Put It Together

Putting together a computer should be easy. In fact, it is easy. So let’s do it.

If you’re interested in the entire process of building your own computer, starting from scratch, then I encourage you to check out Part 1, Part 2, and Part 3. They detail the steps of understanding and choosing your components. But if you’ve got all the components and are ready to install, then it’s time for…

Continue reading

Set up Lisp on your Linux or Mac – Easily!

Note: This post is now 1.5 years old. It uses OS X 10.4, and so may be out of date :(

Common Lisp for Common Folk

Many people in the CS community might associate Lisp with a certain snobbishness or air of superiority.

This has nothing to do with the supposed “power” or “versatility” of the language, nor does it relate to “parse trees”, “macros”, and “code=data”.  No, the actual reason that Lisp is placed so high above the rest of us is that you have to be a Lisp-hacker just to figure out how to install Lisp on your computer.

So: Here are the simple steps required to install and use Common Lisp, spelled out for those of us who aren’t already Lisp-fluent. Continue reading