I had done this in my `node_modules/` folder:

```
$ npm install mysql@2.0.0-alpha9
$ mv node_modules/mysql node_modules/mysql-2.0.0-alpha9
```

So now the mysql@2.0.0-alpha9 directory was renamed from mysql to mysql-2.0.0-alpha9.

```
$ npm install
```

This does nothing. It seems it finds the version of mysql in the directory `mysql-2.0.0-alpha9` and therefore fulfills it, which is not what I was expecting but I guess this explains the behaviour I was seeing.

However if I then do this, it re-installs the alpha version to the `mysql` directory:

```
$ npm install mysql@2.0.0-alpha9
```

I'm not sure if I consider this a bug in npm, but I'm happy with the fact that this works.

Thanks @isaacs.