RPi MySQL

Installing MySQL on Raspberry Pi
This is a guide to install MySQL Community Edition (aka "MySQL") on the Raspberry Pi computer running Debian "squeeze".

MySQL is comprised of two distinct components: There is generally no way to interact with the data stored in the database server without using an external client or library. This is considered a "front end" to the database - a way for the user to send and retrieve data from the database server.
 * MySQL Server
 * The program that actually stores and processes the data.
 * MySQL Client
 * A program or library that connects to an existing MySQL database server.

The guide has been developed/tested using debian6-19-04-2012. Depending on how you choose to install Ruby, there may not be enough room on a standard 2Gb image. This is especially true if you've already installed anything else. Learn how to expand your image here or here.

Commands
sudo apt-get install mysql-server The package manager may suggest a slew of dependencies for MySQL Server. Press "Y" then "enter" (or just "enter") to continue installation. The MySQL installation process will prompt for a password for the MySQL root user account. You can enter a password, or press "enter" to skip the password step - it is your choice. It is poor security to have a blank password if you will be running the MySQL Server on a shared network, but shouldn't matter if you are only using the system for development. The installation process will prompt you two additional times for a MySQL root password. Continue entering the same password (or skipping it) as you did at the first prompt. The MySQL Client is installed as part of the standard MySQL Server package from the Debian repository. You do not need to install additional software to start using MySQL.
 * 1) Install MySQL Server from the Debian repository

Testing Your Installation
mysql --version
 * 1) Verify the MySQL Client was installed

mysql --user=root --password=password
 * 1) Connect to the MySQL Server on localhost

Installing MySQL Client From The Debian Repository
The MySQL Client is a "front end" to an existing database; it does not install the MySQL Server. The MySQL Client can be used to connect to MySQL Server databases across a network. It provides a text-based interface to a MySQL Server, and requires a basic understanding of standard SQL commands. (ie SELECT, UPDATE, INSERT, and DELETE).

Commands
sudo apt-get install mysql-client The package manager may suggest a slew of dependencies for MySQL Client. Press "Y" then "enter" (or just "enter") to continue installation.
 * 1) Install MySQL Client from the Debian repository

Testing Your Installation
The following instructions make these assumptions:
 * You have an existing MySQL Server, whether on localhost or elsewhere across the network
 * The existing MySQL Server "listens for" (accepts) network connections (disabled on a default installation of MySQL Server)
 * The MySQL Server has either:
 * Allowed "root" login over a network connection (disabled on a default installation of MySQL Server), or
 * A MySQL user account for you

Testing Your Installation
mysql --version
 * 1) Verify the MySQL Client was installed

mysql --host=server_address --user=root --password=password
 * 1) Connect to a remote MySQL Server (assumes the server allows root access from a remote computer)

mysql --host=server_address --user=user_name --password=password
 * 1) Connect to a remote MySQL Server (assumes the server has already created your user account)