当前位置:网站首页>Download and installation of the latest version of MySQL 8.0 under Linux (detailed steps)
Download and installation of the latest version of MySQL 8.0 under Linux (detailed steps)
2022-07-30 19:36:00 【m0_67401382】
前言
本篇文章基于Linux 环境下载与安装MySQL 8.0,像基于win 10The system is installed in the same way as the offline version(安装简单),If there is no remote server,You can install a virtual machine on your computer
Create a virtual machine tutorial for details:http://t.csdn.cn/IFAJN
基于Win 10系统下载与安装MySQL 8.0教程详见:http://t.csdn.cn/WyDAv
For details on the installation tutorial of the Connecting Virtual Machine Tool:http://t.csdn.cn/XVy6u
一、下载MySQL
MySQL官网:https://www.mysql.com/cn/
MySQL 8.0下载地址:https://dev.mysql.com/downloads/mysql/
Select your own virtual machine to installLinux版本,下载
二、安装MySQL
1.解压文件
Just right click and unzip it,It will decompress a lot .rpm文件
2.上传文件
Upload the selected files below
使用Xftp工具,上传至 /opt文件夹,If the upload status is wrong,Then turn off the virtual machine firewall and give the folder the highest permissions:chmod -R 777 /opt
3.检查依赖
3.1、检查 /tmp临时目录权限
MySQL安装过程中,会通过MySQL用户在 /tmp目录下新建tmp_db文件,所以给 /tmpFolder highest permissions:chmod -R 777 /tmp
3.2、检查依赖
检查libaio:rpm -qa|grep libaio
检查net-tools:rpm -qa|grep net-tools
如果不存在需要到CentOS安装盘里进行rpm安装,If it is installed with a graphical interface,这些都是安装好的
4.安装
Install the uploaded files one by one(Strictly enforced)
rpm -ivh mysql-community-common-8.0.29-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-plugins-8.0.29-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.29-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-8.0.29-1.el8.x86_64.rpm
rpm -ivh mysql-community-server-8.0.29-1.el8.x86_64.rpm
在安装(server)Dependency detection failed:
在后面增加 --force --nodeps 忽略依赖关系
rpm -ivh mysql-community-server-8.0.29-1.el8.x86_64.rpm --force --nodeps
成功安装
5.查看版本
查看指令:mysql --version
3、使用MySQL
1.初始化服务
为了保证数据库目录与文件的所有者为mysql登录用户,如果是以root 身份运行mysql服务,Then execute the command initialization:mysqld --initialize --user=mysql
会为root用户生成一个密码,After logging in, you need to set a new password,The generated temporary password is recorded in the log
查看密码:cat /var/log/mysqld.log
2.查看服务是否启动
命令:systemctl status mysqld
If the service is not started, start the service:systemctl start mysqld
如果启动成功,Then the installation is no problem
3.查看服务
查看进程:ps -ef | grep -i mysql
查看服务是否自启动:systemctl list-unit-files|grep mysqld.service
默认就是enabled
设置自启动:systemctl enable mysqld.service
The setting does not start automatically:systemctl disable mysqld.service
4.登录
登录(Enter the temporary password):mysql -u root -p
5.修改密码
如果不修改密码,无法操作数据库:alter user 'root'@'localhost' identified by '新密码'
修改密码之后,Log back in and view the database:show databases;
Offline version so farLinux系统安装Mysql 8.0安装成功,操作简单,The master-slave library will be built later,Then use the command line to install online
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在.深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小.自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前.因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- Node encapsulates a console progress bar plugin
- MindSpore:【JupyterLab】按照新手教程训练时报错
- How architects grow
- 什么是 RESTful API?
- What is a RESTful API?
- VBA batch import Excel data into Access database
- 技术很牛逼,还需要“向上管理”吗?
- ImportError:attempted relative import with no known parent package
- [TypeScript]编译配置
- Swiper rotates pictures and plays background music
猜你喜欢
随机推荐
【私人系列】日常PHP遇到的各种稀奇古怪的问题
After watching "Second Uncle", I was even more internalized
MindSpore:【resnet_thor模型】尝试运行resnet_thor时报Could not convert to
Common linked list problems and their Go implementation
第一次进入小程序判断
MindSpore:对image作normalize的目的是什么?
MindSpore:【Resolve node failed】解析节点失败的问题
阿里云武林头条活动分享
WEBSOCKETPP使用简介+demo
MindSpore:数据处理问题
requet.getHeader("token") is null
ImportError:attempted relative import with no known parent package
VBA批量将Excel数据导入Access数据库
尊重客观事实
nlohmann json 使用指南【visual studio 2022】
The use of @ symbol in MySql
防抖和节流有什么区别,分别用于什么场景?
The advanced version of the Niu Ke brushing series (team competition, sorting subsequences, inverting strings, deleting common characters, repairing pastures)
【hbuilder】运行不了部分项目 , 打开终端 无法输入指令
Golang logging library zerolog use record