User Tools

Site Tools


guides:databases:mysql_on_mac_os_x_snow_leopard_-_old_method

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

guides:databases:mysql_on_mac_os_x_snow_leopard_-_old_method [2011/05/23 17:05] (current)
michaelc created
Line 1: Line 1:
 +
 +===== Setup Initial DB and Priviledges =====
 +
 +<​code>​
 +cd /​usr/​local/​mysql
 +sudo ./​bin/​mysql_install_db --user=mysql
 +sudo chown -R mysql ./var
 +</​code>​
 +
 +
 +Copy of screen text after you install db...
 +<​code>​
 +To start mysqld at boot time you have to copy
 +support-files/​mysql.server to the right place for your system
 +
 +PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 +To do so, start the server, then issue the following commands:
 +
 +/​usr/​local/​mysql/​bin/​mysqladmin -u root password '​new-password'​
 +/​usr/​local/​mysql/​bin/​mysqladmin -u root -h mic-2.local password '​new-password'​
 +
 +Alternatively you can run:
 +/​usr/​local/​mysql/​bin/​mysql_secure_installation
 +
 +which will also give you the option of removing the test
 +databases and anonymous user created by default. ​ This is
 +strongly recommended for production servers.
 +
 +See the manual for more instructions.
 +
 +You can start the MySQL daemon with:
 +cd /​usr/​local/​mysql ; /​usr/​local/​mysql/​bin/​mysqld_safe &
 +
 +You can test the MySQL daemon with mysql-test-run.pl
 +cd /​usr/​local/​mysql/​mysql-test ; perl mysql-test-run.pl
 +
 +Please report any problems with the /​usr/​local/​mysql/​bin/​mysqlbug script!
 +
 +The latest information about MySQL is available at http://​www.mysql.com/​
 +Support MySQL by buying support/​licenses from http://​shop.mysql.com/​
 +</​code>​
 +
 +
 +===== Mysql LaunchDaemon Script =====
 +
 +Get the start/stop script from hivelogic and install as follows:
 +
 +<​code>​
 +cd ~/src
 +curl -O http://​hivelogic.com/​downloads/​com.mysql.mysqld.plist
 +sudo mv ~/​src/​com.mysql.mysqld.plist /​Library/​LaunchDaemons
 +sudo chown root /​Library/​LaunchDaemons/​com.mysql.mysqld.plist
 +</​code>​
 +
 +Info Source: http://​hivelogic.com/​articles/​compiling-mysql-on-snow-leopard
 +
 +
 +===== Starting and Stopping Mysql Manually =====
 +
 +  sudo launchctl unload -w /​Library/​LaunchDaemons/​com.mysql.mysqld.plist
 +
 +
 +  sudo launchctl load -w /​Library/​LaunchDaemons/​com.mysql.mysqld.plist
  
guides/databases/mysql_on_mac_os_x_snow_leopard_-_old_method.txt · Last modified: 2011/05/23 17:05 by michaelc