Install mysql
// Upload mysql-5.0.221.tar.gz to this path:/mnt/disk1/program and install
Tar-xzvf mysql-5.0.221.tar.gz
Cd mysql-5.0.22
# Creating a folder
Mkdir/mnt/disk1/program/mysql
# Create a group/etc vi group
Groupadd mysql
# Create a user/home under a group
Useradd-g mysql
# Configuration path
./Configure -- prefix =/mnt/disk1/program/mysql -- with-pic -- with-fPIC can be omitted
# Install the project file
Make clean
# Compile the project
Make
# Install the project file to the System
Make install
#/Mnt/disk1/program/mysql-5.0.22/scripts/mysql_install_db
######################################## ########################
# Initialize the authorization list, which includes the following permission sets
# The MySQL root User is created as a super user who can do anything. The connection must be sent by the local host.
# The generated root password is empty, so anyone can connect with root without a password and grant all permissions.
######################################## ########################
./Scripts/mysql_install_db
# Change the owner and group of all files in/mnt/disk1/program/mysql/to User root
Chown-R root/mnt/disk1/program/mysql/
# Change the owner and group of all files in/mnt/disk1/program/mysql/var/to mysql
Chown-R mysql/mnt/disk1/program/mysql/var/
# Changing the user group of a file
Chgrp-R mysql/mnt/disk1/program/mysql/
# At This Point, mysql installation is complete and can be started
/Mnt/disk1/program/mysql/bin/mysql
# Exit quit
Quit
# Copy/mnt/disk1/program/mysql-5.0.22/support-files/my-huge.cnf to/etc/my. cnf
Cp support-files/my-huge.cnf/etc/my. cnf
Cp/mnt/disk1/program/mysql/share/mysql. server/etc/init. d/mysql
# Start a mysql database
/Mnt/disk1/program/mysql/bin/mysqld_safe -- user = mysql &
# Setting a password for mysql
/Mnt/disk1/program/mysql/bin/mysqladmin-u root password''
# Soft link/sbin/mysql
Ln-s/mnt/disk1/program/mysql/bin/mysql/sbin/mysql
# Soft link/sbin/mysqladmin
Ln-s/mnt/disk1/program/mysql/bin/mysqladmin/sbin/mysqladmin
# Start and Stop the service
Service mysql start
Service mysql stop
# Restart the service
Service mysql restart
Service mysqld status
Author "lvlin1983"