当前位置:网站首页>Installing MySQL under Linux [details]
Installing MySQL under Linux [details]
2022-06-26 10:35:00 【YLi_ Jing】
1、 Download installation package ( With Mysql5.7 For example )
Download mode 1 https://dev.mysql.com/downloads/mysql/5.7.html

Download mode 2 :
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz
2、 Decompress
tar -zxvf mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz
The unzipped folder name is too long , You can rename it
mv mysql-5.7.36-linux-glibc2.12-x86_64 mysql-5.7.36
3、 Some related configurations
Get into mysq-5.7.36 Under the table of contents , Create a new one data Folder
mkdir data
To give permission :
chmod -R 777 data
Create user 、 Group information
groupadd mysql
useradd -g mysql mysql
modify etc/my.cnf file , Here's the whole story , Please change the path to your own installation path
[mysqld]
bind-address=0.0.0.0
port=3306
user=mysql
basedir=/qijingjing/resource/mysql/mysql-5.7.36
datadir=/qijingjing/resource/mysql/mysql-5.7.36/data
socket=/tmp/mysql.sock
log-error=/qijingjing/resource/mysql/mysql-5.7.36/data/mysql.err
pid-file=/qijingjing/resource/mysql/mysql-5.7.36/data/mysql.pid
character_set_server=utf8mb4
symbolic-links=0
explicit_defaults_for_timestamp=true
Get into mysql5.7.36 Of bin Execute the following command under the directory ( Be careful : Path modify your own )
./mysqld --initialize --user=mysql --datadir=/qijingjing/resource/mysql/mysql-5.7.36/data/ --basedir=/qijingjing/resource/mysql/mysql-5.7.36/
Yes mysql The default password is generated for viewing ( It is required to log in later )
cat /qijingjing/resource/mysql/mysql-5.7.36/data/mysql.err

Add soft connection -> So we can start in any directory mysql
ln -s /qijingjing/resource/mysql/mysql-5.7.36/support-files/mysql.server /etc/init.d/mysql
ln -s /qijingjing/resource/mysql/mysql-5.7.36/bin/mysql /usr/bin/mysql
service mysql restart
land mysql
start-up
service mysql start
land
mysql -uroot -p
Enter the password and log in :
Change Password
set password=password(' You need to set the password ');
flush privileges;
Modify access rights
use mysql;
update user set Host='%' where User='root';
flush privileges;
4、 External access
To access the Internet, you need to set the corresponding firewall 3306 Port release , Do the following
firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl restart firewalld.service
If it's a cloud server , To configure release in the security group :

Come here , We can use SQLyog perhaps Navicat Tools are connected using .
边栏推荐
- 35 qlineedit control synthesis example
- Global and Chinese market for baked potato chips 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL 8th job
- MySQL Chapter 5 Summary
- 118. 杨辉三角
- What is a botnet
- Flutter与原生通信(上)
- A list of common methods for customizing paint and canvas of view
- 904. fruit baskets
- Omni channel, multi scenario and cross platform, how does app analyze channel traffic with data
猜你喜欢

See how I store integer data in the map < string, string > set

方法区里面有什么——class文件、class文件常量池、运行时常量池

DBSCAN

创建对象的时候堆内存的分配

Développeur, quelle est l'architecture des microservices?

Establishment of smart dialogue platform for wechat official account

Using foreach to loop two-dimensional array

Allocation de mémoire tas lors de la création d'objets

Use of exec series functions (EXECL, execlp, execle, execv, execvp)

Servlet learning notes II
随机推荐
8- creating leecode algorithm with pictures and texts - algorithm solution of minimum stack and LRU caching mechanism
The sixth MySQL job - query data - multiple conditions
leetCode-链表的中间结点
【Leetcode】76. 最小覆盖子串
創建對象的時候堆內存的分配
Quantitative investment learning - Introduction to classic books
MySQL第十三次作业-事务管理
Little red book - Notes inspiration - project summary
[untitled]
Pytest configuration file
The fourteenth MySQL operation - e-mall project
echo $?
How do technicians send notifications?
Appium自动化测试基础 — 移动端测试环境搭建(二)
US President signs community safety act to deal with gun issue
Global and Chinese market of recycled paper 2022-2028: Research Report on technology, participants, trends, market size and share
About multi table query of MySQL
Yarn package management tool
Global and Chinese market of electronic pet door 2022-2028: Research Report on technology, participants, trends, market size and share
[binary search] 4 Find the median of two positive arrays