may help the beginner to be larger, with ripe big God gate estimate step is to remember.
The specific installation steps are listed below:
Steps
1, the CD to a path to execute the following command:
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
2. Unzip the compressed package just downloaded in the current directory
TAR-ZXVF mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
3, copy the MySQL file to/usr/local/mysql (of course you can specify the other directory)
Cp-r Mysql-5.6.33-linux-glibc2.5-x86_64/usr/local/mysql
4, CD to/usr/local/mysql/data/directory, create a new MySQL directory
mkdir MySQL
5. New users and user groups
Groupadd MySQL
useradd-g MySQL MySQL
6. Set the owner of the directory
Chown-r Mysql:mysql./
7, cd/usr/local/mysql/scripts/
Perform
sudo./mysql_insatll_db--user==mysql--datadir==/usr/local/mysql/data/mysql--basedir=/usr/local/mysql& (must be written so , or you will get an error)
8. sudo cp support-files/mysql.server/etc/init.d/mysqld
9. sudo cp support-files/my-default.cnf/etc/my.cnf
10, sudo chmod 755/etc/init.d/mysqld
11. Edit the Mysqld file
Vi/etc/init.d/mysqld
#修改项
basedir=/usr/local/mysql/
Datadir=/usr/local/mysql/data/mysql
Exit Save
12. Start the service
Service mysqld Start
13. Test Connection
./mysql/bin/mysql-uroot
14. To perform MySQL entry directly under all paths, you need to configure environment variables
Vi/etc/profile
Export paht= $PATH:/usr/local/mysql/bin
Save exit
15, the implementation of Source/etc/profile
Intermediate installation If there is an error, the lack of relevant dependencies, through the APT command to install the '
Installing MySQL----ubuntu in a Linux environment