当前位置:网站首页>Linux MySQL 5.6.51 community generic installation tutorial
Linux MySQL 5.6.51 community generic installation tutorial
2022-07-02 06:40:00 【The health of the bright moon in Qin Dynasty】
List of articles
Preface
As a front-end development , install MySQL Is one of the most basic skills .
One 、 Get installation package
https://downloads.mysql.com/archives/community/
mysql-5.6.51-linux-glibc2.12-x86_64.tar.gz
Two 、 install
1. Unzip the installation package
Installation position
tar -zxvf mysql-5.6.51-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.6.51-linux-glibc2.12-x86_64 mysql
2. Add system mysql Group and mysql user
groupadd mysql
useradd -r -g mysql mysql
3. Create and modify mysql Data directory
Check whether the data directory exists , Namely myql Is there under the directory data Catalog
The above figure shows data Catalog , No need to create
perform vim /etc/my.cnf modify mysql Data directory
4. Modify directory permissions
chown -R mysql:mysql ./
5. Initialize database
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
Seeing the above output indicates that the database is initialized successfully
6. Modify the authority to root
chown -R root:root .
chown -R mysql:mysql data
7. Add startup service
cp support-files/mysql.server /etc/init.d/mysql
Start the service :service mysql start
You can see that the boot failed , According to the error message , Log directory has no permission to create , Manually create the log directory :mariadb
create a file :mariadb.log
Continue to start
According to the prompt, it is UNIX socket file non-existent , This file should be created automatically , Suspect that the directory does not exist , Check and find no /var/lib/mysql Catalog , Create it
Continue to start
The discovery was successful
8. Sign in mysql
here root The user login mysql There is no need to enter a password , If you want to set the password , Keep looking down
9. Set up root User password
UPDATE user SET Password=PASSWORD(‘ Replace with your own password ’) where USER=‘root’;
FLUSH PRIVILEGES;
Log in again
It is found that the password is not entered , Login denied . Check the settings just now mysql root User password .
summary
Original installation mysql Is not complicated , It will be more perfect if you can write this installation process into an automated script when you have time .
Reference documents
https://www.cnblogs.com/xinjing-jingxin/p/8025805.html
https://iwww.me/240.html
边栏推荐
- 压力测试修改解决方案
- Kotlin - 验证时间格式是否是 yyyy-MM-dd HH:mm:ss
- Tensorrt command line program
- selenium的web自动化中常用的js-修改元素属性翻页
- Codeforces Round #797 (Div. 3) A—E
- 查询GPU时无进程运行,但是显存却被占用了
- Selenium memo: selenium\webdriver\remote\remote_ connection. Py:374: resourcewarning: unclosed < XXXX > solution
- Pytest (1) case collection rules
- kali最新更新指南
- Idea announced a new default UI, which is too refreshing (including the application link)
猜你喜欢
Win10:添加或者删除开机启动项,在开机启动项中添加在用户自定义的启动文件
查询GPU时无进程运行,但是显存却被占用了
华为MindSpore开源实习机试题
Redis - hot key issues
Summary of advertisement business bug replay
【文献阅读与想法笔记13】 Unprocessing Images for Learned Raw Denoising
Shardingsphere JDBC
Linux MySQL 5.6.51 Community Generic 安装教程
Apt command reports certificate error certificate verification failed: the certificate is not trusted
ShardingSphere-JDBC篇
随机推荐
Sentinel规则持久化到Nacos
CUDA中的Warp matrix functions
There are multiple good constructors and room will problem
Redis——大Key问题
sprintf_s的使用方法
ShardingSphere-JDBC篇
selenium备忘录:selenium\webdriver\remote\remote_connection.py:374: ResourceWarning: unclosed<xxxx>解决办法
底层机制Mvcc
Sentinel rules persist to Nacos
js中对于返回Promise对象的语句如何try catch
20210306转载如何使TextEdit有背景图片
Fe - use of weex development weex UI components and configuration use
CUDA中的存储空间修饰符
Vector types and variables built in CUDA
Redis——缓存击穿、穿透、雪崩
IDEA公布全新默认UI,太清爽了(内含申请链接)
FE - Weex 使用简单封装数据加载插件为全局加载方法
Sentinel 阿里开源流量防护组件
Detailed definition of tensorrt data format
Latest CUDA environment configuration (win10 + CUDA 11.6 + vs2019)