Learning Mysql


Installing Under Linux | 27



Download 4.24 Mb.
View original pdf
Page33/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   29   30   31   32   33   34   35   36   ...   366
Learning MySQL
Installing Under Linux | 27

The MySQL directory is self-contained and has all the files you need to run and access the server. If you have superuser access on the Linux machine and want this MySQL
server to be the system-wide instance on the machine, you should move it across to a the standard location under the /usr/local/ directory mv mysql-standard-5.0.22-linux-i686 /usr/local/
and make a link
/usr/local/mysql that points to this directory ln -symbolic /usr/local/mysql-standard-5.0.22-linux-i686 /usr/local/mysql
Now you can simply refer to the MySQL directory as
/usr/local/mysql
. Using a symbolic link in this way allows you to have different versions of MySQL ready to run on the system, with
/usr/local/mysql pointing to the directory containing the version you want to use.
If you want to have a local installation, you can leave the MySQL directory under your home directory. You’ll probably find it helpful to create the link
/mysql to point to the actual MySQL directory—for example ln -symbolic
/mysql-standard-5.0.22-linux-i686
/mysql

With this link, you can use
/mysql wherever you want to refer to the
/mysql-

standard-5.0.22-linux-i686 directory.
Installing MySQL on Linux by Compiling the Source Code from MySQL AB
Given the nature of this book, we won’t go into detailed compile-time settings, but will just look at how you can quickly get the server up and running.
First, you need to download the source file package from the MySQL AB downloads page, following the directions in Downloading MySQL from the MySQL AB Web
Site.” Go to the Source downloads section and download the Tarball (tar.gz)”
package.
After downloading, you should have a file with a name like mysql-5.0.22.tar.gz. Decompress this package using the following command tar --gunzip -extract -file mysql-5.0.22.tar.gz
This creates anew directory containing the MySQL source files change your working directory to this by typing cd mysql-5.0.22
You must now compile the source code and install the resulting programs. After you’ve done this, you’ll have a MySQL directory that has all the files you need to run and access the server. This is very similar to the tarball approach. Unlike the tarball approach,
however, you need to first use the configure command to tell the compilation process where you want the MySQL directory to be located.

Download 4.24 Mb.

Share with your friends:
1   ...   29   30   31   32   33   34   35   36   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page