当前位置:网站首页>mysql简单安装
mysql简单安装
2022-08-09 09:28:00 【潇湘梦】
服务器环境是centos 7.6 这篇教程是通过yum方式安装的。
安装依赖
yum install libaio wget -y
检查MYSQL是否已安装(二次安装需要考虑)
yum list installed | grep mysql
卸载方法
yum -y remove mysql-libs.x86_64
下载MySQL官网的仓库文件
cd /tmp
wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
yum localinstall mysql80-community-release-el7-1.noarch.rpm
验证是否安装成功
yum repolist enabled | grep "mysql.*-community.*"
安装mysql
yum install mysql-community-server -y
此时MySQL 安装完成,它包含了
mysql-community-server、mysql-community-client
mysql-community-common、mysql-community-libs 四个包
执行
rpm -qi mysql-community-server.x86_64 0:8.0.16-2.el7
然后
whereis mysql
可以看到MySQL 的安装目录是 /usr/bin/
启动服务
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld

安装后查找初始化的密码:
cat /var/log/mysqld.log | grep password
进入mysql
mysql -uroot -p
修改初始化密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '你的密码';
设置允许远程连接
mysql> use mysql;
mysql> select host,user,authentication_string,plugin from user;
mysql> update user set host='%' where user='root';
mysql> flush privileges;
查看字符集
mysql> status

根据修改后的密码登录下成功就好
边栏推荐
猜你喜欢

"The camera can't be used" + win8.1 + DELL + external camera + USB drive-free solution

Redis high availability

常用命令之思科常用基础配置

性能测试包括哪些方面?分类及测试方法有哪些?

第三方免费开放API 获取用户IP 并查询其地理位置

Summary of steps and methods for installing and uninstalling test cases that you must read
What does the test plan include?What is the purpose and meaning?

本体开发日记05-努力理解SWRL(下)
软件测试的流程规范有哪些?具体要怎么做?
全网最全的软件测试基础知识整理(新手入门必学)
随机推荐
性能测试的基本概念是什么?做好性能测试需要掌握哪些知识?
银联最新测试工程师笔试题目,你能得多少分?
Sweet alert
Ontology Development Diary 03 - When debugging is in progress
6.Map接口与实现类
电脑硬件基础知识科普
[Machine Learning] Basics of Data Science - Basic Practice of Machine Learning (2)
WAVE SUMMIT 2022深度学习开发者峰会
Consolidation of Questionnaire Questions and Answers
2. Byte stream
黑盒测试常见错误类型说明及解决方法有哪些?
LPP代码及其注释
自动化测试简历编写应该注意哪方面?有哪些技巧?
What are the basic concepts of performance testing?What knowledge do you need to master to perform performance testing?
Do you know the basic process and use case design method of interface testing?
MySQL Leak Detection and Filling (2) Sorting and Retrieval, Filtering Data, Fuzzy Query, Regular Expression
命令行查询数据库
1.流的概念
迭代
米斗APP逆向分析