| [root@centos701 ~]# hostname -I 10.0.0.200 172.17.0.1 [root@centos701 ~]# hostname centos701 [root@centos701 ~]# rpm -qa | grep mariadb [root@centos701 ~]# rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64 [root@centos701 ~]# useradd mysql -s /sbin/nologin #创建数据目录 [root@centos701 ~]# mkdir -p /data/3306 #创建软件目录 [root@centos701 ~]# mkdir -p /app/database #创建日志目录 [root@centos701 ~]# mkdir -p /binlog/3306 [root@centos701 ~]# cd /app/database/ [root@centos701 database]# tar -zxvf mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz [root@centos701 database]# mv mysql-5.7.9-linux-glibc2.5-x86_64 mysql #加入到环境变量 [root@centos701 ~]# cat <<EOF>>/etc/profile #mysql的path export PATH=/app/database/mysql/bin/:$PATH EOF #授权 [root@centos701 ~]# chown -R mysql.mysql /app /data /binlog #刷新 [root@centos701 ~]# source /etc/profile #版本 [root@centos701 ~]# mysql -V #初始化 [root@centos701 ~]# mysqld --initialize-insecure --user=mysql --basedir=/app/database/mysql --datadir=/data/3306 #配置文件 [root@centos701 ~]# cat > /etc/my.cnf <<EOF [mysql] socket=/tmp/mysql.sock [mysqld] user=mysql port = 3306 basedir=/app/database/mysql datadir=/data/3306 server_id=6 socket=/tmp/mysql.sock character-set-server=utf8mb4 EOF #配置启动 [root@centos701 ~]# cd /app/database/mysql/support-files/ [root@centos701 support-files]# cp mysql.server /etc/init.d/mysqld [root@centos701 ~]# service mysqld start #进入mysql [root@centos701 ~]# mysql mysql> set password for root@localhost=password('root'); [root@centos701 ~]# mysql -uroot -p |
001-mysql安装
2025/11/5 17:29:34
来源:https://blog.csdn.net/weixin_42682872/article/details/144272084
浏览:
次
关键词:001-mysql安装
版权声明:
本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。
我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com
热文排行
- 老外讲解用Delphi 12.3作web
- 数据库物理结构设计
- 华为 海思22AP10(SS524)H.265 编解码处理器用户指南
- 基于重要抽样的主动学习不平衡分类方法ALIS
- 开源模型时代的 AI 开发革命:Dify 技术深度解析
- npm install puppeteer 报错 npm ERR! PUPPETEER_DOWNLOAD_HOST is deprecated解决办法
- 【量化策略】均值回归策略
- 《缺失MRI模态下的脑肿瘤分割的潜在相关表示学习》| 文献速递-深度学习肿瘤自动分割
- 如何在 Mac 上清空硬盘后恢复丢失的数据?
- (2)Django生产环境数据库的切换以及环境配置python-dotenv方案
最新新闻
- 001-mysql安装
- 爬虫——有道云翻译
- EmotionPrompt 论文精读
- 苍穹外卖(缓存商品、购物车)
- 数据集-目标检测系列- 人与猫互动 猫 检测数据集 cat in the house >> DataBall
- PageOffice国产版在线编辑word文件
- 一套SaaS ERP管理系统源码,支持项目二开商用,SpringBoot+Vue+ElementUI+UniAPP
- FastAPI -- 第三弹(自定义响应、中间件、代理、WebSockets)
- GPU 计算 CMPS224 2021 学习笔记 02
- SpringSecurity Context 中 获取 和 更改 当前用户信息的问题
推荐新闻
- 001-mysql安装
- 爬虫——有道云翻译
- EmotionPrompt 论文精读
- 苍穹外卖(缓存商品、购物车)
- 数据集-目标检测系列- 人与猫互动 猫 检测数据集 cat in the house >> DataBall
- PageOffice国产版在线编辑word文件
- 一套SaaS ERP管理系统源码,支持项目二开商用,SpringBoot+Vue+ElementUI+UniAPP
- FastAPI -- 第三弹(自定义响应、中间件、代理、WebSockets)
- GPU 计算 CMPS224 2021 学习笔记 02
- SpringSecurity Context 中 获取 和 更改 当前用户信息的问题
