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
Preface The simple understanding of MySQL permiss...
This article shares the specific code of Vue intr...
I worked in operations and maintenance for two ye...
1. Install JDK 1. Uninstall the old version or th...
Preface: Partitioning is a table design pattern. ...
This article shares the specific code of Vue to s...
Abstract: Whether at work or in an interview, opt...
To summarize: Readonly is only valid for input (te...
I recently read about vue. I found a single-file ...
An absolute URL is used to represent all the conte...
Table of contents Precautions Necessary condition...
1. Unzip the zip package to the installation dire...
Install Nginx on Docker Nginx is a high-performan...
1. The ul tag has a padding value by default in M...
Table of contents 1. v-on directive 1. Basic usag...