This article shares the MySQL 5.7.16 free installation version tutorial for your reference. The specific content is as follows MySQL: 5.7.16 Download address: http://dev.mysql.com/downloads/mysql/; Linux-Generic is the installation-free version, I chose 64-bit There is a document on the MySQL website for the specific installation method. If you are good at English, don't read what I wrote. 1. Preparation before installation 1. Turn off the firewall #Close in setup 2. Disable selinux #This option has not been tested to see if it is necessary shell>vi /etc/selinux/config SELINUX=disabled # SELINUX parameter enforcing means enabling, disabled means disabling 3. Create a myql account shell> useradd mysql 4.MySQL depends on libaio library, query and install libaio library shell> yum search libaio shell> yum install libaio 5. Check if there is an old version of MYQL in the system, please delete it. #Query method: rpm –qa|grep mysql 6. Download mysql5.7.16 shell>wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz 2. MySQL installation 1. Unzip the installation file; copy it to /usr/local/mysql shell>tar –zxvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz shell>cp -R mysql-5.7.16-linux-glibc2.5-x86_64 /usr/local/mysql 2. Configure /etc/my.cnf shell>vi/etc/my.cnf [mysqld] #skip-grant-tables #Specify a single table engine #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES datadir=/data/mysql basedir=/usr/local/mysql ##open sqllog general_log=ON general_log_file=/data/mysql/query.log #Open event scheduler event_scheduler = 1 #Open bin-log log_bin=/data/bin/mysql-bin server-id=230 #explicit_defaults_for_timestamp=true 3. Modify the root account .bash_profile shell> vi /root/.bash_profile #PATH=$PATH:$HOME/bin PATH=$PATH:$HOME/bin:/usr/local/mysql/bin 4.MySQL installation shell>cd /usr/local/mysql/ shell>bin/mysqld –initialize #Remember the temporary password shell>bin/mysql_ssl_rsa_setup shell>bin/mysqld_safe --user=mysql& shell>chown -R mysql:mysql /usr/local/mysql/ #Change permissions shell>mkdir –p /data/mysql #Create a data file directory and authorize shell>chown –R mysql:mysql /data/mysql 5. Start mysql and set it to start at boot shell>cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld shell>servicemysqld start shell>chkconfig --add mysqld #Add to startup 6. Log in to mysql shell>mysql –uroot –p #Enter the previous temporary password shell> alter user 'root'@'localhost'identified by "fineex.1"; Note: In this version, you must change your password after logging in before you can perform other database operations. shell> grant all to 'root'@'%' identified by "foxconn.1"; #Authorize remote login to mysql; % allows all hosts to access, please use with caution Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 versions 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:
|
<<: How to completely uninstall Docker Toolbox
>>: ReactRouter implementation
[LeetCode] 185. Department Top Three Salaries The...
Table of contents 1. Data Type 1.1 Why do we need...
April 23, 2020, Today, Ubuntu 20.04 on Windows al...
This article shares the installation and configur...
2.1 Semanticization makes your web pages better u...
Table of contents What is Vuex? Vuex usage cycle ...
1. Basic Environment 1. Operating system: CentOS ...
This article uses examples to explain the basic k...
The author of this article @子木yoyo posted it on hi...
What is a generator? A generator is some code tha...
First, install PHP5 very simple yum install php T...
Table of contents Introduction How to connect to ...
How to declare a cursor in mysql: 1. Declare vari...
This article shares the specific method of instal...
Note: To crack the root password in MySQL5.7, you...