This tutorial shares the installation and configuration methods of MySQL 5.6.33 under Linux for your reference. The specific contents are as follows 1. Download Download address: http://dev.mysql.com/downloads/mysql/5.6.html#downloads Download version: I chose 5.6.33 here, general version, 64-bit under Linux You can also directly copy the 64-bit download address and download it through the command: Copy the code as follows: wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz 2. Decompression #Unzip tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz #Copy the unzipped mysql directory cp -r mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/mysql 3. Add user groups and users #Add user group groupadd mysql #Add user mysql to user group mysql useradd -g mysql mysql 4. Installation cd /usr/local/mysql/<br>mkdir ./data/mysql chown -R mysql:mysql ./ ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data/mysql cp support-files/mysql.server /etc/init.d/mysqld chmod 755 /etc/init.d/mysqld cp support-files/my-default.cnf /etc/my.cnf #Modify the startup script vi /etc/init.d/mysqld #Modifications: basedir=/usr/local/mysql/ datadir=/usr/local/mysql/data/mysql #Start the service service mysqld start #Test connection ./mysql/bin/mysql -uroot #Add environment variables and edit /etc/profile so that you can use mysql commands anywhere export PATH=$PATH:/usr/local/mysql//bin<br>source /etc/profile #Start mysql service mysqld start #Shut down mysql service mysqld stop #View the running status service mysqld status 5. Errors 5.1 When sqlyog connects, error 1130 is reported because the user permissions for the remote connection are not given Solution 1: Change the 'host' entry in the 'user' table of the 'mysql' database from 'localhost' to '%'. use mysql; select 'host' from user where user='root'; update user set host = '%' where user = 'root'; flush privileges; Solution 2: Direct authorization Copy the code as follows: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION; 5.2 Some errors during installation -bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: no such file or directory Solution: yum -y install perl perl-devel Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory 6. Others 6.1 Configure environment variables vi + /etc/profile export PATH=....:/usr/local/mysql/bin Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.6 installation tutorials for various versions MySQL 5.7 installation tutorials for various versions mysql8.0 installation tutorials for various 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 lock a virtual console session on Linux
>>: How to achieve 3D dynamic text effect with three.js
When developing a project, you will often encount...
The nginx configuration file is mainly divided in...
1. Experimental description In the virtual machin...
Preface I recently used :first-child in a project...
In Docker's design, a container runs only one...
The DATE_ADD() function adds a specified time int...
Previously, my boss asked me to make a program th...
1. Create a project with vue ui 2. Select basic c...
Table of contents 1. React combined with Antd to ...
This article mainly introduces the typing effect ...
Table of contents Preface Instruction Basics Hook...
To draw a table in HTML, use the table tag tr me...
If you open some Microsoft documents with LibreOf...
The conversion between time, string and timestamp...
Hello everyone, today we are going to learn about...