当前位置:网站首页>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开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- The problem of writing go run in crontab does not execute
- MySQL函数(经典收藏)
- Spark学习:编译Spark项目时遇到的报错
- VBA 运行时错误‘-2147217900(80040e14):自动化(Automation)错误
- 阿里云武林头条活动分享
- Alibaba Cloud Martial Arts Headline Event Sharing
- LeetCode每日一题(1717. Maximum Score From Removing Substrings)
- 来了!东方甄选为龙江农产品直播带货
- Node encapsulates a console progress bar plugin
- 试写C语言三子棋
猜你喜欢
经济新闻:错误# 15:初始化libiomp5md。dll,但发现libiomp5md。已经初始化dll。解决方法
- daily a LeetCode 】 【 191. A number of 1
PostgreSQL 14.4如何安装使用
MySQL数据库之JDBC编程
redis
Delay queue optimization (2)
MySQl数据库————DQL数据查询语言
2种手绘风格效果比较,你更喜欢哪一种呢?
The advanced version of the cattle brushing series (search for rotating sorted arrays, inversion of the specified range in the linked list)
防抖和节流有什么区别,分别用于什么场景?
随机推荐
ImportError: attempted relative import with no known parent package
【hbuilder】运行不了部分项目 , 打开终端 无法输入指令
crontab中写go run不执行的问题
After watching "Second Uncle", I was even more internalized
What is the value of biomedical papers? How to translate the papers into Chinese and English?
在华为云,见证迷你世界的神奇觉醒
【刷题篇】计算质数
LeetCode 0952.按公因数计算最大组件大小:建图 / 并查集
Correct pose of Vulkan open feature
Delay queue optimization (2)
Range.CopyFromRecordset method (Excel)
Alibaba Cloud Martial Arts Headline Event Sharing
Start background services across processes
MindSpore:【语音识别】DFCNN网络训练loss不收敛
coming!Dongfang Selection brings goods to the live broadcast of Longjiang agricultural products
又一家公司面试的内容
MindSpore:数据处理问题
Common linked list problems and their Go implementation
经济新闻:错误# 15:初始化libiomp5md。dll,但发现libiomp5md。已经初始化dll。解决方法
第一次进入小程序判断