I believe that many have noticed that at the office of MySQL there is no dmg MySQL package for Leopard. I didn’t risk and run the tiger package, but just collected my database server directly from the sources. This is done like this:
It is necessary to know / be able / have:
You know what a console is and how to use it (even at the level of a teapot - this will be enough)
You are familiar with the basics of * nix and do not experience problems with an orgasm from a translucent console in MacOS X
You already have Xcode, if you don’t have one, download and install Xcode 3.0 from offsite
So, in the matter, baby, yes!
You need to add the following paths to our PATH (this is in .bash_profile)
export PATH = "/ usr / local / bin: / usr / local / sbin: / usr / local / mysql / bin: $ PATH"
Well, of course download this file.
. ~ / .bash_profile
Making a new folder for sors
cd ~
mkdir src
cd src
Swing and unpack the MySQL sors
curl -O http://mysql.he.net/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz
tar xzvf mysql-5.0.45.tar.gz
cd mysql-5.0.45
cd / usr / local / mysql
sudo ./bin/mysql_install_db --user = mysql
sudo chown -R mysql ./var
Actually - that's all. The server is installed and ready to go. However, habrachelovek == a lazy person, but because he de facto wants the server to start (and shut down) itself when the system boots. How to achieve this? Elementary, Watson, Mr. Jobs and then prepared for these Jedi special pills to enter the matrix. So:
You need to create a file on the desktop com.mysql.mysqld.plist and zafigachit the following text:
<? xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE plist PUBLIC "- // Apple // DTD PLIST 1.0 // EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version = "1.0">
<dict>
<key> KeepAlive </ key>
<true />
<key> Label </ key>
<string> com.mysql.mysqld </ string>
<key> Program </ key>
<string> / usr / local / mysql / bin / mysqld_safe </ string>
<key> RunAtLoad </ key>
<true />
<key> UserName </ key>
<string> mysql </ string>
<key> WorkingDirectory </ key>
<string> / usr / local / mysql </ string>
</ dict>
</ plist>
Further this file should be marked in the right place.
Theoretically, everything is now in a bundle and the server is already running and waiting for an honest developer to force it, you can check it with a simple command: