This article shares with you the tutorial of installing MySQL 5.7.13 on VMWare Linux for your reference. The specific content is as follows 1. Basic environment description Virtual Machine: VMWare Operating system: Linux Database version: MySQL 5.7.13 Community Edition (don’t ask why not install the Enterprise Edition, because the Enterprise Edition costs money) Background: The virtual machine can connect to the external network 2. Find out the details Check if MySQL is already installed on Linux ① Start the service service mysqld start If it is not installed, it will prompt ② Check whether the service exists on Linux chkconfig --list mysqld If it is not installed, it will prompt 3. Create a /tools directory (download the file to this directory) and enter the /tools directory # mkdir /tools # cd /tools 4. Download MySQL 5.7.13 #wget http://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz 5. Decompression # tar -xzf mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz 6. Create directory /data/mysql (installation directory) # cd / # mkdir data # cd /data # mkdir mysql 7. Create new mysql users, groups and directories # groupadd mysql # useradd -r -s /sbin/nologin -g mysql mysql -d /tools/mysql-5.7.13-linux-glibc2.5-x86_64 8. Switch directory and grant permissions #cd /tools/mysql-5.7.13-linux-glibc2.5-x86_64 #pwd #chown –R mysql . #chgrp –R mysql . #chown -R mysql /data/mysql If steps 6-8 are not done, an error will be reported: bin/mysqld: no such file or directory 9. Set parameters # bin/mysqld --initialize --user=mysql --basedir=/tools/mysql-5.7.13-linux-glibc2.5-x86_64 --datadir=/data/mysql Note: remember the temporary password in the red box, you will need it later. #bin/mysql_ssl_rsa_setup --datadir=/data/mysql 10. Modify the configuration file # cd support-files # cp my-default.cnf /etc/my.cnf # cp mysql.server /etc/init.d/mysql # vim /etc/init.d/mysql Modify the following: # vim /etc/my.cnf Modify the following: After the modification, it is best to check it again. Sometimes accidental spelling mistakes can lead to a lot of messy errors. 11. Start mysql Note: Check if the path used in the my.cnf configuration file exists. If it does not exist, create it yourself. # bin/mysqld_safe --user=mysql & bin/mysql --user=root –p --Enter the temporary password generated in step 9 12. Change the root password mysql> set password=password('123456'); --Enter a new password 13. Grant permissions mysql> grant all privileges on *.* to 'root'@'%' identified by '123456'; mysql> flush privileges; 14. Check the results mysql> use mysql; mysql> select host,user from user; mysql> exit; 15. Add system path # vim /etc/profile Add to: # source /etc/profile 16. Configure MySQL to start automatically # chmod 755 /etc/init.d/mysql # chkconfig --add mysql # chkconfig --level 345 mysql on Most of the above configurations refer to: MySQL 5.7.13 Installation and Configuration Methods Graphic Tutorial The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: WeChat Mini Program user authorization to obtain mobile phone number (getPhoneNumber)
>>: How to implement Linux disk mounting, partitioning, and capacity expansion operations
Table of contents Exporting Docker containers Imp...
Flex layout is also called elastic layout. Any co...
Preface: The "Getting Started with MySQL&quo...
Table of contents iview-admin2.0 built-in permiss...
In centos7, the permissions of the /etc/rc.d/rc.l...
The two parameters innodb_flush_log_at_trx_commit...
Preface "High Performance MySQL" mentio...
The specific code is as follows: package epoint.m...
Relationship between MySQL and MariaDB MariaDB da...
Docker has many log plug-ins. The default is to u...
Preface In the MySQL database, sometimes we use j...
How to check the file system type of a partition ...
Table of contents Introduction Download and insta...
Step 1: Add Ubuntu source Switch to root su root ...
Running Docker requires root privileges. To solve...