Skip to content
Jay B. Martin edited this page Oct 17, 2013 · 1 revision

Databases

MySQL

MAMP: MySQL as an app.

This is an unorthodox way to run MySQL, but possibly also the easiest.

  1. Download and install MAMP from this website (No need for the Pro version).
  2. Open the application to turn on a MySQL database (click "Start Servers").
  3. A website for controlling MySQL (phpMyAdmin) should automatically open; if not there is a button to open it. Use it to create a new user called 'mturk' with an associated database of the same name.
  4. Add the following line to the config.txt file in your PsiTurk project, changing mturk to something else if you used a different database name:

database_url: mysql://mturk@localhost/mturk?unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock

Now follow the instructions for setting up Python to use MySQL.

MySQL as a daemon

This is the traditional way of running a MySQL database.

  1. Follow the instructions here to install MySQL.
  2. Create a database for the mysql user called mturk (or whatever you want):

mysql -umysql CREATE DATABASE mturk

Then add the following line to the config.txt file in your PsiTurk project:

database_url: mysql://mysql@localhost:3306/mturk

Preparing Python to use MySQL

Install the MySQL connection software using:

sudo easy_install mysql-connector-python sudo easy_install mysql-python

...you may get an error regarding a dylib file. If so follow the instructions here