I cannot find any guides on how to install MySQL on a Raspberry Pi running Occidentalis 0.2; Occidentalis is a Raspbian derivative.

I cannot use apt-get to install it even after running apt-get update. I guess I'll need to compile MySQL myself. What is the experience with doing this?

This is what I tried:

pi@raspberrypi ~ $ sudo apt-get install mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
  • It installs using apt-get on Raspbian. Unless you have a specific reason for using Occidentalis it might be easier to just use that.
    – Kibbee
    Sep 17, 2012 at 16:56
  • If you need a database on Occidentalis, use sqlite instead. I'm reasonably certain it will keep up on a low load. Sep 17, 2012 at 17:00
  • @Kibbee: Occidentalis is based on Raspbian so it should use the same repos. If it's available in Raspian, it should be available in Occidentalis too, unless something is broken. Sep 17, 2012 at 17:02
  • @AlexChamberlain: MySQL should also be able to work with quite low resources. And SQLite is very simple and lacks a lot of features of true RDBMs so it might not be suitable for many workloads. Sep 17, 2012 at 17:04
  • maybe im doing something wrong. edited question with my install steps
    – mkoryak
    Sep 17, 2012 at 17:32

2 Answers 2


Easy answer:

sudo apt-get install mysql-server

You just forgot the -server string!!

Good luck!

  • damn it... always editing both my answers and my questions ;)
    – Christian
    Sep 17, 2012 at 22:52
  • 2
    Don't forget that you can use apt-cache search foo to search for package names if you are not sure of them.
    – dsas
    Sep 18, 2012 at 20:32

Occidentalis, Raspbian and Debian divide the MySQL functionality into 2 packages: mysql-server and mysql-client. They can be installed using apt-get install, which should be run as root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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