当前位置:网站首页>Installing mysql8 under Linux
Installing mysql8 under Linux
2022-04-22 05:39:00 【Excellent face】
install mysql:
mysql Official address :https://dev.mysql.com/downloads/mysql/
Installation steps :
- Get into /usr/local/ Catalog , And create... In this directory mysql Catalog
cd /usr/local
- download Mirror image
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.11-linux-glibc2.12-x86_64.tar.gz
- decompression :
tar -zxvf mysql-8.0.11-linux-glibc2.12-x86_64.tar.gz
If it is .xz Format can be used tar -Jxvf mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz)
- Rename
mv ./mysql-8.0.11-linux-glibc2.12-x86_64.tar mysql8
# This directory structure
cd /usr/local/mysql/mysql8
# establish data Catalog
mkdir ./data
- Create user group , And authorize the operation
groupadd mysql
useradd -g mysql mysql
chown -R mysql.mysql /usr/local/mysql/mysql8/
- stay /usr/local/mysql/mysql8 Under the table of contents , Get a temporary password
./bin/mysqld --user=mysql --basedir=/usr/local/mysql/mysql8/ --datadir=/usr/local/mysql/mysql8/data/ --initialize ;
If you make a mistake , Do the following , Install dependent plug-ins
yum install libaio*
- modify Mysql To configure :
vim /etc/my.cnf
# Edit content
basedir=/usr/local/mysql/mysql8
socket=/tmp/mysql.sock
datadir=/usr/local/mysql/mysql8/data
character-set-server=utf8
- add to Mysql To system services
# Conduct mysql8 Under the table of contents
cd /usr/local/mysql/mysql8
# perform :
cp -a ./support-files/mysql.server /etc/init.d/mysql
cd /etc/init.d/
chmod +x /etc/init.d/mysql
chkconfig --add mysql
chkconfig --list mysql
- Configure environment variables :
vim /etc/profile
# Edit content
MYSQL_HOME=/usr/local/mysql/mysql8
PATH=$PATH:$MYSQL_HOME/bin
export PATH MYSQL_HOME
# After saving the file , Perform refresh operation
source /etc/profile
- start-up Mysql service :
# start-up
service mysql start;
# Check the status
service mysql status;
# To configure
ln -s /usr/local/mysql/mysql8/bin/mysql /usr/bin
- Log in :
mysql -uroot -p Input password
- Change the temporary password :
# stay MySQL perform
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ' New password ';
Configure remote connection :
- Turn off firewall :
# Check the status :
systemctl status firewalld
# Turn on :
systemctl start firewalld
# close :
systemctl stop firewalld
- Set up mysql Set up a remote connection :
# stay MySQL Execute... Under the window
use mysql;
select host, user, authentication_string, plugin from user;
update user set host='%' where user='root';
FLUSH PRIVILEGES;
版权声明
本文为[Excellent face]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220532446411.html
边栏推荐
猜你喜欢

Mycat的读写分离

MySQL高级查询

Strong connected component of "tarjan" undirected graph

Mysql基础知识

判断链表是否有环

C WinForm about incomplete display of listview

2022 Niuke winter vacation supplementary question record 2

JVM探究
![[fedmd, a heterogeneous FL training method using model distillation] fedmd: heterogeneous federated learning via model distillation](/img/25/210dd6b74fe555a819097b97721983.png)
[fedmd, a heterogeneous FL training method using model distillation] fedmd: heterogeneous federated learning via model distillation

Pratique du langage C (2) - - mise en oeuvre de l'addition polynomiale par liste liée
随机推荐
MySQL偶尔的卡顿
我常用的开发软件
GBase 8s V8. 8 SQL Guide: tutorial-5.2 (3)
MySQL索引
Mycat的读写分离
Establishment, addition, deletion, modification and query of sequence table
2022.4.21-----leetcode.824
mysql非常用命令
xxxx(动态库名称): cannot open shared object file: No such file or directory
MySQL基础命令及练习题(一)
MySQL数据库基础
Force buckle - 300 Longest increasing subsequence
12.猴子爬山
Write a program to automatically generate the two-color ball number of welfare lottery with MATLAB
C language version: establishment and basic operation of two-way linked list
ThreadLocal.ThreadLocalMap分析
MySQL函数及练习题(二)
GBase 8s V8.8 SQL 指南:教程-6.1.2(1)
Force buckle - 322 Change
strlen的三种实现方法你知道吗?