当前位置:网站首页>Ubuntu安装mysql8遇到的问题以及详细安装过程
Ubuntu安装mysql8遇到的问题以及详细安装过程
2022-07-07 18:42:00 【No Bug】
在网上找了一篇博客照着安装,但是中间还是出了不少问题,如果跟着以上博文安装mysql8出现问题的话可以看看以下错误总结。
一、在初始化mysql时候报错 [ERROR] [MY-013455] [Server] The newly created data directory /usr/local/mysql/mysql-8.0/data/ by --initialize is unusable. You can remove it.
2022-07-05T13:49:12.012670Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-05T13:49:12.012828Z 0 [System] [MY-010910] [Server] /usr/local/mysql/mysql-8.0/bin/mysqld: Shutdown complete (mysqld 8.0.20) MySQL Community Server - GPL.

./mysqld --user=mysql --basedir=/usr/local/mysql/mysql-8.0 --datadir=/usr/local/mysql/data/ --initialize
在初始化之前,博主都会要创建一个data文件存放mysql文件,但是我提前创建再初始化就报错,建议提前创建,让mysql自动创建。
二、 初始化遇到 Could not use /var/log/mysql/mysql.log for logging (error 13 - Permission denied). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL GENERAL_LOG=ON" or restart the MySQL server.

could not use 大概率就是文件的权限不够。
先看文件路径是否存在,不存在的话手动创建一下。
存在的话 chown mysql mysql.log 修改文件权限
三、不能启动mysql Job for mysqld.service failed because the control process exited with error code.See "systemctl status mysqld.service" and "journalctl -xe" for details.

vim /etc/my.cnf 把下面内容添加上
[client]
port=3306
socket=/var/lib/mysql/mysql.socksocket=/var/lib/mysql/mysql.sock(跟这个socket路径一样)
边栏推荐
- AADL inspector fault tree safety analysis module
- I wrote a markdown command line gadget, hoping to improve the efficiency of sending documents by garden friends!
- 如何满足医疗设备对安全性和保密性的双重需求?
- 机械臂速成小指南(十二):逆运动学分析
- 备份 TiDB 集群到持久卷
- 【奖励公示】第22期 2022年6月奖励名单公示:社区明星评选 | 新人奖 | 博客同步 | 推荐奖
- 【C语言】指针进阶---指针你真的学懂了吗?
- CodeSonar网络研讨会
- POJ 1742 Coins ( 单调队列解法 )「建议收藏」
- [résolution] le paquet « xxxx» n'est pas dans goroot
猜你喜欢

Static analysis of software defects codesonar 5.2 release

ERROR: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your

Mrs offline data analysis: process OBS data through Flink job

Dachang classic pointer written test questions

Nebula importer data import practice

程序猿赚的那点钱算个P啊!

机械臂速成小指南(十二):逆运动学分析

Codesonar Webinar

CodeSonar网络研讨会

目标:不排斥 yaml 语法。争取快速上手
随机推荐
EasyGBS级联时,上级平台重启导致推流失败、画面卡住该如何解决?
智能软件分析平台Embold
Codesonar enhances software reliability through innovative static analysis
九度 1201 -二叉排序数遍历- 二叉排序树「建议收藏」
使用高斯Redis实现二级索引
Airiot helps the urban pipe gallery project, and smart IOT guards the lifeline of the city
【网络原理的概念】
Small guide for rapid formation of manipulator (11): standard nomenclature of coordinate system
凌云出海记 | 赛盒&华为云:共助跨境电商行业可持续发展
AADL inspector fault tree safety analysis module
上海交大最新《标签高效深度分割》研究进展综述,全面阐述无监督、粗监督、不完全监督和噪声监督的深度分割方法
I wrote a markdown command line gadget, hoping to improve the efficiency of sending documents by garden friends!
Helix QAC 2020.2新版静态测试工具,最大限度扩展了标准合规性的覆盖范围
Useful win11 tips
凌云出海记 | 易点天下&华为云:推动中国电商企业品牌全球化
Apifox interface integrated management new artifact
Prometheus remote_write InfluxDB,unable to parse authentication credentials,authorization failed
4G设备接入EasyGBS平台出现流量消耗异常,是什么原因?
CodeSonar网络研讨会
【C语言】指针进阶---指针你真的学懂了吗?
https://blog.csdn.net/qq_35124072/article/details/122867295?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165702417916781667814164%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165702417916781667814164&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-4-122867295-null-null.142^v31^control,185^v2^tag_show&utm_term=linux+%E5%AE%89%E8%A3%85mysql8.0&spm=1018.2226.3001.4187