How to install and configure mysql 5.7.19 in centos6.5, centos6.55.7.19
Centos6.5 detailed steps for installing mysql5.7.19 are as follows:
1. Download mysql5.7.19 from the oracle website
2. added the centos user group and user MySQL.
Groupadd mysql
Useradd mysql-g mysql
3. decompress the files to be installed to the specified directory,
You need to set the chown 755 directory to allow mysql access.
4. Find the bin in the decompressed mysql directory and find the mysqld executable file in the bin. Run
./Mysqld -- user = mysql -- basedir =/home/mysql/mysql-5.7.16-linux-glibc2.5-x86_64 -- datadir =/home/mysql/data -- initialize
5. Copy the my-defalut.cnf in the support-files directory under the installation directory to/etc/my. cnf
6. Copy mysql. service under the support-files directory under the installation directory to/etc/init. d/mysqld
7. Set the mysql connection and connect mysql in the bin in the installation directory to/usr/local/bin.
Ln-fs/home/mysql/mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysql/usr/local/bin/mysql
8. Modify/etc/my. cnf
Set
Basedir =/home/mysql
Datadir =/home/mysql/data
User = mysql
9. start mysql with service mysql
10. When mysql-uroot is connected to mysql, the following prompt is displayed: root @ localhost is not allowed to log on. You need to set a password.
Disable mysql first
Modify/etc/my. cnf
Add skip-grant-tables to mysqld
Enable mysql
Enter
Mysql> UPDATE mysql. user SET authentication_string = password ('000000') WHERE User = 'root' AND Host = 'localhost ';
Modify the root password.
Or go to mysql> set password = password ('20140901 ');
11. Set the character type of the database
Edit/etc/my. cnf
Add in mysqld
Character-set-server = utf8
Add
Default-character-set = utf8
12. view the character type of the database
Mysql> show variables like "% character % ";
Highlights: mysql installation tutorials for different versions mysql5.7 installation tutorials for various versions mysql5.6 installation tutorials
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.