1. Go to the official website to download the installation package Download link: Click to open the link https://dev.mysql.com/downloads/mysql/ If your system is 32-bit, choose the first one; if your system is 64-bit, choose the second one. You can also download it using wget wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.11-linux-glibc2.12-i686.tar.gz Unzip the file tar -zxvf mysql-8.0.11-linux-glibc2.12-i686.tar.gz 2 Move the compressed package to the usr/local directory and rename the file mv /root/mysql-8.0.11-linux-glibc2.12-i686 /usr/local/mysql 3. Create a new folder data in the MySQL root directory to store data mkdir data 4. Create mysql user group and mysql user groupadd mysql useradd -g mysql mysql 5. Change the mysql directory permissions chown -R mysql.mysql /usr/local/mysql/ Or chown -R mysql . chgrp -R mysql . Note the last point 6. Initialize the database Create the mysql_install_db installation file mkdir mysql_install_db chmod 777 ./mysql_install_db initialization bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data //Initialize the database or /usr/local/mysql/bin/mysqld --initialize --user=mysql /usr/local/mysql/bin/mysqld --initialize --user=mysql /usr/local/mysql/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 5826 [Server] A temporary password is generated for root@localhost: twi=Tlsi<0O! /usr/local/mysql/bin/mysqld (mysqld 8.0.11) initializing of server has completed Record your temporary password: twi=Tlsi<0O! There is a problem here that there is no libnuma.so.1
libnuma needs to be installed yum install libnuma yum -y install numactl yum install libaio1 libaio-dev Installation Files 7.mysql configuration cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld Modify the my.cnf file vim /etc/my.cnf [mysqld] basedir = /usr/local/mysql datadir = /usr/local/mysql/data socket = /usr/local/mysql/mysql.sock character-set-server=utf8 port = 3306 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [client] socket = /usr/local/mysql/mysql.sock default-character-set=utf8 esc to save :wq quit 8 Establish MySQL Service cp -a ./support-files/mysql.server /etc/init.d/mysqld cp mysql.server /etc/init.d/mysql chmod +x /etc/init.d/mysql Add to system services chkconfig --add mysql cp -a ./support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/rc.d/init.d/mysqld chkconfig --add mysqld Check whether the service is effective 9. Configure global environment variables Edit /etc/profile file Add the following two lines of configuration at the bottom of the profile file, save and exit export PATH=$PATH:/usr/local/mysql/bin:/usr/local/mysql/lib export PATH Setting environment variables takes effect immediately 10. Start MySQL service View initial password 11. Log in to MySQL To change your password: SET PASSWORD FOR 'root'@localhost=PASSWORD('123456'); #Replace it with your own password. 12Set up remote login mysql>use mysql mysql>update user set host='%' where user='root' limit 1; Refresh permissions Then check if port 3306 is open Open port 3306 Restart the firewall Summarize The above is the tutorial on installing MySQL8.0.11 under Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Install Jenkins with Docker and solve the problem of initial plugin installation failure
>>: js realizes shopping cart addition and subtraction and price calculation functions
Basic knowledge of responsive layout development ...
This article shares the installation and configur...
Recently, I want to build a hadoop test cluster i...
There is no problem with the Dockerfile configura...
<body> <div id="root"> <...
Scenario 1. Maintain a citizen system with a fiel...
Introduction: In many cases, many people think th...
Effect screenshots: Implementation code: Copy code...
Table of contents 1. Merge interface 1.1 Non-func...
A colleague once told me to use a temporary table...
The find command is mainly used to find directori...
Configure Git environment in Docker At work, I en...
Table of contents 1. Mathematical functions 2. St...
Table of contents Requirements: Implementation st...
As shown below: update table1 as z left join tabl...