Database Reference
In-Depth Information
OS X. After you install homebrew , you can run the following from the command line to
install MariaDB:
brew install mariadb
To install MySQL with the TAR package instead of the DMG package, download the
TAR file from Oracle's site and move it to the /usr/local directory, then change to that dir-
ectory. Next, untar and unzip the installation program like so:
cd /usr/local
tar xvfz mysql- version .tar.gz
Change the name of the installation package in the example to the actual name. From
here, create asymbolic link for the installation directory, and then run the configuration
program. Here is an example of how you might do this:
ln -s /usr/local/mysql- version /usr/local/mysql
cd /usr/local/mysql
./configure --prefix=/usr/local/mysql \
--with-unix-socket-path=/usr/local/mysql/mysql_socket \
--with-mysqld-user=mysql
The first line creates the symbolic link to give MySQL a universal location regardless of
future versions; change version to the actual version number. By making a symbolic
link to a generic directory of /usr/local/mysql , you'll always know where to find MySQL
when you need it. You could also just rename the directory with the version name to just
mysql . But then you can't test new versions and keep old versions when upgrading.
With the second line, you enter the directory where the installation files are now located.
The third line runs the configuration program to install MySQL. I've included a few op-
tions that I think will be useful for solving some problems in advance. Depending on your
needs, you might provide more options than these few. However, for most beginners,
these should be enough.
Next, you should set who owns the files and directories created, and which group has
rights to them. Set both the user and group to mysql , which should have been created by
the installation program. For some systems, you may have to enable permissions for the
hard drive or volume first. To do that, usethe vsdbutil utility. If you want to check wheth-
er permissions are enabled on the volume first, use the -c option; to just enable it, use -a
option for vsdbutil . You should also make a symbolic link from the /usr/bin directory to
the mysql and mysqladmin clients:
vsdbutil -a /Volumes/Macintosh\ HD/
Search WWH ::




Custom Search