====== mysql ====== * download source from http://dev.mysql.com (version 5) * [[..:add_user|create a 'mysql' user account]] (Leopard comes with a _mysql user) ./configure --prefix=/usr/local/mysql \ --mandir=/usr/local/man \ --infodir=/usr/local/info \ --enable-local-infile \ --enable-thread-safe-client make sudo make install sudo cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf (modify /etc/my.cnf as desired) cd /usr/local/mysql sudo chown -R mysql:mysql . (if you have not installed MySQL before, you must create the MySQL data directory and initialize the grant tables) sudo /usr/local/mysql/bin/mysql_install_db --user=mysql sudo chown -R root . sudo chown -R mysql var (note - if you get a socket error when trying the command below to start the server, you need to create the socket file like this) cd /tmp sudo touch mysql.sock sudo chown mysql:wheel mysql.sock (start the MySQL server) sudo /usr/local/mysql/bin/mysqld_safe --user=mysql & (setup a password for root) sudo /usr/local/mysql/bin/mysqladmin -u root password 'new-password' (shutdown the MySQL server) sudo /usr/local/mysql/bin/mysqladmin -u root -p shutdown ===== thread safe client ===== The **%%--enable-thread-safe-client%%** flag tells mysql to build mysqlclient_r. The is required in some programs, such as [[mediatomb]]. ===== See Also ===== * [[..:creating_startup_items]] ===== External Links ===== * [[http://www.osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws|creating a startup item in Mac OS X (uses mysql as an example)]] * http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html