Author: heiyelurenQQ group: 5415735 (Linux/BSD installation protection group) Date: 2004/8/18 -- special thanks to QQ group friends Nan, this article was generated under his patience-it was a little difficult to see friends installing mysql on Unix/Linux, so I just had to install it easily.
Author:Heiyeluren
QQ group: 5415735 (Linux/BSD installation protection group)
Date: 2004/8/18
-- Special thanks to QQ Group's friend Anan. This article is only available under his patient leadership --
It may be a little difficult to install mysql on Unix/Linux. the control system of my application is FreeBSD5.2.1. if other control systems may have different installation methods, handle them as appropriate.
I won't talk about installing FreeBSD. I just need to customize it a little. I won't talk about the process. The FreeBSD version I use is 5.2.1 and should be a newer version, I don't know later :).
1. install MySQL
Mysql of my application is 4.0.20, source code version, you can also apply RPM package or binary version, the installation method may be different, please refer to other articles.
Download the source code version of Mysql2.0.20:Http://dev.mysql.com/downloads/mysql/4.0.html
Put it down to the/usr/local/src Directory, if there is no such Directory, create a. downloaded package named mysql-4.0.20.tar.gz, and then we decompress it:
# Tar-zxvf mysql-4.0.20.tar.gz
Decompress the inherent mysql-4.0.20 Directory, we enter the directory:
# Cd mysql-4.0.20
After entering, we start to configure mysql. during the configuration process, we need to set an installation directory for mysql, which is under/usr/local/mysql, I think it is easier to put files in one place. if you want to get more configuration information and apply it. /configure -- help:
#./Configure -- prefix =/usr/local/mysql
Wait a few seconds and then compile the source code after the configuration is complete:
# Make
This compilation process is relatively long. if the machine is relatively slow, it may take nearly 20 sub-categories (PS: My machine is a very common machine, and all the sub-categories with less than 15 or 6 sub-categories are used :().
Install the SDK after compilation:
# Make install
Wait a few seconds to complete the installation. the most important part is the following: why is the old installation not successful? (PS: At least I have installed it N times, N> 10, huh). The title is here, A special user is required to visit mysql. here we will set root and mysql to have access permissions.
We first set up a mysql and mysql User to visit mysql:
# Pw groupadd mysql # Create a mysql Group
# Pw useradd mysql-g mysql # Create a mysql User and join the mysql Group
After the user is created, initialize the table (note: you must perform this step before proceeding to the following steps)
#./Scripts/mysql_install_db -- user = mysql # Preliminary Test table and requires mysql users to visit
After the table is initialized, the client sets the access permissions for mysql and root users. we will first install the mysql Directory:
# Cd/usr/local/mysql
Then set permissions
# Chown-R root. # set root to visit/usr/local/mysql
# Chown-R mysql var # set mysql users to visit/usr/local/mysql/var, which stores mysql database files.
# Chown-R mysql var/. # set mysql users to visit all files under/usr/local/mysql/var