当前位置:网站首页>centos随笔03:centos8.2安装mysql
centos随笔03:centos8.2安装mysql
2022-06-11 08:17:00 【uikoo9】

【mysql/mariadb】
由于使用的是腾讯云轻应用服务器,这里安装mariadb替代

【dnf/yum】
dnf是yum包管理器的升级,虽然在服务器上这两个命令都可以用,建议使用dnf管理包
【检索mariadb】
dnf search mariadb通过search命令可以检索可以安装的应用包
【安装mariadb】
dnf install mariadb mariadb-server在centos下需要安装mariadb和mariadb-server两个包
【初始化mysql】
mysql_install_db --user=mysql通过初始化命令,可以初始化mysql,初始化成功后有一些提示
【启动mariadb服务】
systemctl start mariadb
systemctl enable --now mariadb启动mariadb的服务,并且配置到启动项内
【设置root密码】
mysqladmin -u root password 'zzzzzz'通过这个命令设置root的密码,尽量设置的复杂一些
【开启一些安全的设置项】
mysql_secure_installation通过提示的方式开启一些安全的设置,
都是一些常见的操作
1.设置root密码
2.删除无关用户
3.禁止非root账号登陆
4.删除test数据库
5.刷新权限等

【登陆mysql】
mysql -uroot -p输入之前设置的密码,就可以登陆mysql了

【感】
现在安装mysql,要比之前简单多了~
边栏推荐
- Summary of evaluation index knowledge points in target detection: summary of IOU cross overlap unit and map/ap/tp/fp/np
- 学习《缠解论语》
- Solve cannot import name 'multiheadattention' from 'tensorflow keras. layers‘
- Tutoriel de démarrage bladed (vidéo)
- 用 Keras/TensorFlow 2.9 创建深度学习模型的方法总结
- 【案例解读】医疗单据OCR识别助力健康险智能理赔
- Typescript type protection
- Several ways to avoid concurrent modification exceptions of lists
- How to start participating in the open source community
- Return in foreach and break in for
猜你喜欢

Magnifying mirror rendering

(resolved) typeerror: meshgrid() got an unexpected keyword argument 'indexing‘

Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version

TRUNC in pytorch_ normal_ principle

Solution to the occurrence interval (space) of latex manual numbering documents

These gadgets are also very easy to use

Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)

如何开始参与开源社区

用 Keras/TensorFlow 2.9 创建深度学习模型的方法总结

JS learning basics document Write write a line of text in the page
随机推荐
Training yolov4 CSP model using coco dataset
How to do well in empty state design? Look at this comprehensive summary
Mongodb--- automatically delete expired data using TTL index
Bubble sorting with C language
JS basic learning script
Clipping and overlapping of YUV data
进程控制:进程等待(回收子进程)
bat 批处理单独环境打包
Scrape captures 51job Recruitment Information (static page)
Testing firebase with postman
Dameng user management
彻底记住ImageView的background和src的区别
TypeScript-分布式条件类型
Development of sylixos SD device driver
【 史上最全的ENSP【安装图解】!】
Typescript class and interface, class and generic, interface merging
TypeScript-接口和类型别名异同
如何做好空状态设计?来看这份全面总结
使用特殊字符拼接字符串“+“
What does it mean to buy a single-mode, dual-mode and Rechargeable Wireless Mouse