当前位置:网站首页>mysql_linux版本的下載及安裝詳解
mysql_linux版本的下載及安裝詳解
2022-04-23 18:48:00 【#眼鏡&】
文章目錄
1、mysql的下載
MySQL 的官網下載地址: 官網




2、mysql的安裝
上傳到: /usr/local/mysql
查看centos自帶的mysql,若存在則移除
rpm -qa | grep mysql # 查看
rpm -ev mysql-libs-* --nodeps # 删除
安裝rpm包
rpm -ivh mysql-community-client-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-common-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-libs-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-server-5.7.25-1.el6.x86_64.rpm --force --nodeps
–force --nodeps: 錶示安裝時不檢查依賴關系
啟動mysql
# 查看mysql的狀態
service mysqld status
service mysqld start
初始化隨機密碼
cat /var/log/mysqld.log | more
查看隨機密碼:
grep pass /var/log/mysqld.log --color
登陸並修改密碼:
[root@web ~]#mysql -uroot -p
mysql> set password='Pwd@123456';
mysql> grant all privileges on *.* to 'root'@'%' identified by 'Pwd@123456';
設置開機自啟動
chkconfig --add mysql
# 查看是否添加成功
chkconfig --list
如果上一步添加不成功,則手動添加到啟動配置文件裏
vim /etc/rc.d/rc.local
# 添加
service mysqld start
防火牆端口策略
# 添加3306端口
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
# 保存
/etc/init.d/iptables save
# 重啟
service iptables restart
# 查看狀態
/etc/init.d/iptables status
版权声明
本文为[#眼鏡&]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231848086201.html
边栏推荐
- CISSP certified daily knowledge points (April 14, 2022)
- Daily network security certification test questions (April 12, 2022)
- CANopen STM32 transplantation
- Database computer experiment 4 (data integrity and stored procedure)
- 机器学习理论基础篇--关于机器学习的一些术语
- WebView saves the last browsing location
- Ionic instruction set order from creation to packaging
- 程序员如何快速开发高质量的代码?
- Kettle paoding jieniu Chapter 17 text file output
- 关于unity文件读取的操作(一)
猜你喜欢

ESP32 LVGL8. 1 - bar progress bar (bar 21)

STM32: LCD display

Query the logistics update quantity according to the express order number

kettle庖丁解牛第17篇之文本文件输出

Practice of Druid SQL and security in meituan review

Use Chenxi bookkeeping book to analyze the balance of revenue and expenditure of each account in a certain period of time

ctfshow-web362(SSTI)

教你用简单几个步骤快速重命名文件夹名

解决:cnpm : 无法加载文件 ...\cnpm.ps1,因为在此系统上禁止运行脚本

Practice of Druid SQL and security in meituan review
随机推荐
Use stm32cube MX / stm32cube ide to generate FatFs code and operate SPI flash
The corresponding permissions required to automatically open the app in the setting interface through accessibility service
7、 DOM (Part 2) - chapter after class exercises and answers
Advanced transfer learning
ctfshow-web362(SSTI)
ESP32 LVGL8. 1 - textarea text area (textarea 26)
Druid SQL和Security在美团点评的实践
listener. log
教你用简单几个步骤快速重命名文件夹名
PyGame tank battle
With the use of qchart, the final UI interface can be realized. The control of qweight can be added and promoted to a user-defined class. Only the class needs to be promoted to realize the coordinate
Sentinel rule persistence into Nacos
Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
Nacos作为服务注册中心
机器学习理论基础篇--关于机器学习的一些术语
Iptables - L executes slowly
Use of content provider
After CANopen starts PDO timing transmission, the heartbeat frame time is wrong, PDO is delayed, and CANopen time axis is disordered
Introduction to QT programming
RPM package management