当前位置:网站首页>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
边栏推荐
- Golang -- map capacity expansion mechanism (including source code)
- Latex 编译报错 I found no \bibstyle & \bibdata & \citation command
- Find the highest value of the current element Z-index of the page
- 实习生跑路留了一个大坑,搞出2个线上问题,我被坑惨了
- 压力测试修改解决方案
- Alibaba cloud MFA binding Chrome browser
- 默认google浏览器打不开链接(点击超链接没有反应)
- Shardingsphere JDBC
- web自动中利用win32上传附件
- Sentinel Alibaba open source traffic protection component
猜你喜欢
QQ email cannot receive the email sent by Jenkins using email extension after construction (timestamp or auth...)
Fe - wechat applet - Bluetooth ble development research and use
Win10桌面图标没有办法拖动(可以选中可以打开可以删除新建等操作但是不能拖动)
Win10:添加或者删除开机启动项,在开机启动项中添加在用户自定义的启动文件
Win电脑截图黑屏解决办法
Sublime Text 配置php编译环境
[literature reading and thought notes 13] unprocessing images for learned raw denoising
Présence d'une panne de courant anormale; Problème de gestion de la fsck d'exécution résolu
由於不正常斷電導致的unexpected inconsistency;RUN fsck MANUALLY問題已解决
Data science [viii]: SVD (I)
随机推荐
Does the assignment of Boolean types such as tag attribute disabled selected checked not take effect?
ModuleNotFoundError: No module named ‘jieba.analyse‘; ‘jieba‘ is not a package
(第一百篇BLOG)写于博士二年级结束-20200818
Kotlin - 验证时间格式是否是 yyyy-MM-dd HH:mm:ss
Sentinel Alibaba open source traffic protection component
部署api_automation_test过程中遇到的问题
实习生跑路留了一个大坑,搞出2个线上问题,我被坑惨了
ZZQ的博客目录--更新于20210601
web自动化切换窗口时报错“list“ object is not callable
After reading useful blogs
Android - Kotlin 下使用 Room 遇到 There are multiple good constructors and Room will ... 问题
FE - weex 开发 之 使用 weex-ui 组件与配置使用
Win电脑截图黑屏解决办法
Warp shuffle in CUDA
Latex参考文献引用失败 报错 LaTeX Warning: Citation “*****” on page y undefined on input line *
Sparse array (nonlinear structure)
Summary of advertisement business bug replay
The intern left a big hole when he ran away and made two online problems, which made me miserable
由於不正常斷電導致的unexpected inconsistency;RUN fsck MANUALLY問題已解决
分布式事务 :可靠消息最终一致性方案