Install mysql-4.0.26 notes under RedHat9:
The original code package of mysql-4.0.26.tar.gz is obtained. Note that it is not binary. Use the following command to modify the actual path based on your own situation:
--- Create a mysql installation directory
Su-root
Cd/usr/local
Mkdir mysql
Of course, you can also create a directory using a common account, if you do not have a root account.
--- Configure the environment
Let's take a look at the help to see the name and meaning of the parameter:./configure -- help
Simple operation of some parameters: the most important parameter: -- prefix =/usr/local/mysql
CXX = gcc./configure -- prefix =/usr/local/mysql -- enable-validator -- with-mysqld-ldflags =-all-static -- with-extra-charsets = complex
--- Compile and install
Make
Make install
/Usr/local/mysql/bin/mysql_install_db: find/usr/local/mysql-name mysql_install_db if this file is not in this directory.
Generate the var directory and the following mysql and test. Note that the subsequent operation prompt is the next step.
-- Modify permissions because we need to run the database server with the mysql account permission
Chown-R root/usr/local/mysql
Chown-R mysql/usr/local/mysql/var: directory for saving database data files and log files
Chgrp-R mysql/usr/local/mysql
-- Set the configuration file of the mysql database server, including the TCP port number. This can be modified when the default port number 3306 is occupied by others.
Cp/usr/local/mysql/share/mysql/my-medium.cnf/etc/my. cnf
-- Run the database server with mysql account Permissions
/Usr/local/mysql/bin/safe_mysqld -- user = mysql &
-- Set the root account password: note that the IP address must be checked for mysql account logon. Generally, the logon IP address of the root account is set to 127.0.0.1 as secure.
/Usr/local/mysql/bin/mysqladmin-u root-p password 'new-password'
/Usr/local/mysql/bin/mysqladmin-u root-h ***-p password 'new-password'
Note:
1. the root account of mysql is not the root account of the operating system;
2. Run with mysql permissions. This mysql account is an account of the operating system, not an account of the mysql database;
3. The differences between the operating system account and the mysql database account are clearly divided.