当前位置:网站首页>linux下安装mysql
linux下安装mysql
2022-07-28 04:38:00 【爱吃咖喱鸡】
@linux下安装mysql
0、导入jar包到opt/mysql
1、检查
rpm -qa|grep mariadb
如果存在则卸载
请先执行卸载命令:rpm -e – nodeps mariadb-libs-5.5.56-2.e17.x86_64
必须有如下两个包
rpm -qa|grep libaio
rpm -qa|grep net-tools
2、授权 chmod -R 777 /tmp
3、安装mysql
rpm -ivh mysql-community-common-5.7.16-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.16-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.16-1.el7.x86_64.rpm
sudo rpm -ivh --nodeps mysql-community-server-5.7.16-1.el7.x86_64.rpm
另一种:yum安装
4、查看版本
mysqladmin --version命令
5、初始化服务
mysqld --initialize --user=mysql
6、查看密码
cat /var/log/mysqld.log
7、相关服务
启动 systemctl start mysqld.service
关闭 systemctl stop mysqld.service
8、登录修改密码
mysql -u root -p
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
9、修改字符集
vim /etc/my.cnf
在最后加上:character_set_server=utf8
并重启
systemctl restart mysqld.service
skip-name-resolve 表示跳过dns解析以后连接mysql
10、授权远程连接
再次登录mysql授予远程连接
grant all privileges on . to [email protected]‘%’ identified by ‘123456’;
刷新权限
flush privileges;
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl restart mysqld.service
最后本地连接
边栏推荐
- scipy.stats.chi2
- High number_ Chapter 4__ Curvilinear integral_ Exercise solution
- What is the account opening process of qiniu business school? Is it safe?
- 23 openwrt switch VLAN configuration
- How to upgrade a pair of 12.2 RAC(primary) and a pair of 12.2 RAC(dataguard) to 19c
- What to do when encountering slow SQL? (next)
- [yolov5 practice 5] traffic sign recognition system based on yolov5 -yolov5 integration pyqt5
- pytorch打包exe出现WARNING: file already exists but should not: C:\Users\workAI\AppData\Local\Temp\_MEI13
- Full resolution of the use of go native plug-ins
- Information system project manager (2022) - key content: Information System Security Management (20)
猜你喜欢

将数据库拿到的数据渲染到elementUI 中的table中去

Destructor of member function

VAE generation model (with VAE implementation MNIST code)

MySQL: data types and operators

物联网工业串口转WiFi模块 无线路由WiFi模块的选型

Reading of seq2path: generating sentimental tuples as paths of a tree

Important SQL server functions - string utilities

Use animatedbuilder to separate components and animation, and realize dynamic reuse

Introduction to this pointer

DNS series (III): how to avoid DNS spoofing
随机推荐
空间复杂度计算超全整理!!(一起手撕复杂度计算
Warning: file already exists but should not: c:\users\workmai\appdata\local\temp appears when Python packages exe\_ MEI13
Niuke, convert string to integer
What is the account opening process of qiniu business school? Is it safe?
Web渗透之域名(子域名)收集方法
Transformer landing | next vit realizes the real-time landing of industrial tensorrt, surpassing RESNET and cswin
[practice] use the web animations API to realize a clock with accurate timing
01 node express system framework construction (express generator)
[Sylar] framework -chapter11 socket module
登录之后右上角改变 进入登录状态
Destructor of member function
Reading of a unified generic framework for aspect based sentimental analysis
Jupyter Notebook安装代码提示功能
[record of question brushing] 9. Number of palindromes
Information system project manager (2022) - key content: Project Risk Management (11)
【sylar】框架篇-Chapter7-IO 协程调度模块
set与list性能对比
Study of the Intel aria 10 Avalon mm DMA interface for PCI Express solutions User Guide
could only be written to 0 of the 1 minReplication nodes. There are 0 datanode(s) running and 0 node
【sylar】实战篇-基于 redis 的参数查询服务