Three Ways to install:
1. Install sudo apt-get install Mysql-server from the Web. Once the environment variables have been configured automatically, you can use the MySQL command directly.
Note: It is recommended to change the CN in/etc/apt/source.list to us, the U.S. server is much faster than China.
2. Install the offline package, taking mysql-5.0.45-linux-i686-icc-glibc23.tar.gz as an example.
3. Binary Package Installation: The environment variables are configured automatically when the installation is complete, and you can use the MySQL command directly
Online installation and binary package installation is relatively simple, focusing on the installation of offline packages.
1. Groupadd MySQL
2. Mkdir/home/mysql
3. useradd-g mysql-d/home/mysql MySQL
4. Copy mysql-5.0.45-linux-i686-icc-glibc23.tar.gz to/usr/local directory
5. Unzip: Tar zxvf mysql-5.0.45-linux-i686-icc-glibc23.tar.gz
6. Ln-s mysql-5.0.45-linux-i686-icc-glibc23 MySQL
7. Cd/usr/local/mysql
8. chown-r MySQL.
9. chgrp-r MySQL.
scripts/mysql_install_db--user=mysql (Be sure to execute in the MySQL directory, note the output of the text, there are changes to the root password and the command to start MySQL)
11. Set the password for root:./bin/mysqladmin-u root password ' passw0rd '