Database Reference
In-Depth Information
aDB on all Unix types of operating systems are basically the same. This includes Linux,
FreeBSD, and Sun Solaris. These steps are explained in this section.
To install a source distribution, you will need copies of GNU gunzip , GNU tar , GNU gcc
(at leastVersion 2.95.2), and GNU make . These tools are usually included in Linux sys-
tems and most Unix systems. If your system doesn't have them, you can download them
from the GNU Foundation site .
Once you've chosen and downloaded the source distribution files for MySQL or Mari-
aDB, enter the following commands asrootfrom the directory where you want the source
files stored:
groupadd mysql
useradd -g mysql mysql
tar xvfz /tmp/mysql- version .tar.gz
cd mysql- version
These commands are the same for installing MariaDB, except that the name of the install-
ation package file will be something like mariadb-5.5.35.tar.gz and the name of the dir-
ectory created when expanding the TAR file will be different. The first line creates the
filesystem user group, mysql . The second creates the system user, mysql , and adds it to the
mysql group at the same time. The next command uses the tar utility (alongwith gunzip
via the z option) to unzip and extract the source distribution file you downloaded. Replace
the word version with the version number. Use the actual file path and name of the in-
stallation file that you downloaded for the second argument of the tar command. The last
command changes the directory to the onecreated by tar in the previous line. That direct-
ory contains the files needed to configure MySQL.
This brings you to the next step, which is to configure the source files to prepare them for
building the binary programs. This is where you can add any special build requirements
you may have. For instance, if you want to change the default directory from where
MySQL or MariaDB is installed, use the --prefix option with a value set to equal the
desired directory. To set the Unix socket file's path, use --with-unix-socket-
path . If you would like to use a different character set from the default of latin1 , use
--with-charset and name the character set you want as the default. Here is an ex-
ample of how you might configure MySQL with these particular options before building
the binary files:
./configure --prefix=/usr/local/mysql \
--with-unix-socket-path=/tmp \
--with-charset=latin2
Search WWH ::




Custom Search