docs:mac:builds:mysql

mysql

./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

The --enable-thread-safe-client flag tells mysql to build mysqlclient_r. The is required in some programs, such as mediatomb.

  • docs/mac/builds/mysql.txt
  • Last modified: 2012/04/25 22:09
  • by billh