1.yum Install Lrzsz installation upload function
2. Check to see if the system is equipped with Mysql:rpm-qa | grep MySQL
3. View system MySQL location: Whereis MySQL
4. Uninstall Mysql:yum-y Remove mysql-libs.x86_64
5. View the MySQL version on the Yum library Yum list | grep MySQL or yum-y list mysql*
6. View the current Linux version command cat/procersion
7. Download to http://mirrors.sohu.com/mysql/MySQL-5.6/
Mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz
8. Upload and unzip the tar package.
9. Install the database, or you will be prompted without a table
. Install the database
CD mysql-5.6.21/scripts (database installation directory)
./mysql_install_db--user=mysql--basedir=/(Database installation directory)--datadir=/(Database storage directory)
For example:
./mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysqldata/data
Exit
10.CP my-default.cnf/etc/my.cnf
CP Mysql.server/etc/init.d/mysql
11. Configure Environment variables
Vim/etc/profile
Export Mysql_home= "/software/mysql-5.6.21"
Export path= "$PATH: $MYSQL _home/bin"
Save exit
. /etc/profile
11. Allow environment variables to take effect quickly
Source/etc/profile
12. Add MySQL User
Groupadd MySQL
Useradd-r-G MySQL MySQL
Assigning folder permissions to MySQL users
Chown-r mysql:mysql [MySQL installation folder]
Get
/etc/init.d/mysql start
13 in-Database
Mysql-uroot-p Setting a password
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' Your_password ' with GRANT OPTION;
#允许root用户远程访问
14 Modify MySQL Password:
Set password for ' root ' @ ' localhost ' =password (' new password ');
For example
Set password = password (' xxx ');
Or
Set password for ' root ' @ ' localhost ' =password (' 123456 ');
The workaround for the user table could not be found:
/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--
datadir=/data/mysqldata/data&
Stop MySQL
cd/usr/local/mysql/
scripts/mysql_install_db--user=mysql
from MySQL
./bin/mysqld_safe--basedir=/data/mysql--datadir=/data/mysql-5.6.21/data--skip-grant-tables &
Install MySQL steps