Learning Mysql



Download 4.24 Mb.
View original pdf
Page34/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   30   31   32   33   34   35   36   37   ...   366
Learning MySQL
28 | Chapter 2:
Installing MySQL

If you have superuser privileges and want your MySQL installation to be system-wide,
it’s best to install to a directory under the /usr/local directory—for example, /usr/local/
mysql-5.0.22. On the other hand, if you want to run a local server, you can have the
MySQL directory wherever you wish—for example, under your own home directory at
/mysql-5.0.22
.
To install MySQL to the directory /usr/local/mysql-5.0.22, we call the configure command with the target as follows ./configure --prefix=/usr/local/mysql-5.0.22
If all is not well, you may see some error messages. Problems during configuration are generally due to Linux programs and libraries missing from your system read the error messages carefully to identify the cause of the problem.
If the configuration is successful, you can use the make command to compile the files make
The compilation process may take along time.
You need to use the GNU variant of the make program (http://www.gnu
.org/software/make). The make command on most Linux systems is in fact the GNU make program if you run into problems when using make, it might not be GNU make, and the problem maybe resolved by using the gmake
(GNU make) command instead.
When it’s done, you need to install the files to the directory you specified earlier. If you’ve chosen to install a local server, you can simply type make install
If—as in our example—you’ve specified a prefix path that you can’t normally write to as an ordinary user, you’ll need to first login as root su -
and then run make install from the root prompt to copy the compiled files to the target installation directory make install
If all goes well, the MySQL files will be installed in the correct directory. You’ll often find it helpful to create a link to refer to this directory easily. For example, fora system- wide server, you can make the link
/usr/local/mysql to point to the /usr/local/
mysql-5.0.22 directory ln -symbolic /usr/local/mysql-5.0.22 /usr/local/mysql
Now you can simply refer to the MySQL directory as
/usr/local/mysql
. Similarly, if you specified the path /home/adam/mysql-5.0.22 fora local installation, you can make the link
/mysql to point to the
/mysql-5.0.22
directory:

Download 4.24 Mb.

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




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

    Main page