mysql 5.7.12----bin/mysqld --initialize --user=mysql出错
我最近在安装mysql 5.7.12,本来之前安装mysql 5.7.11时用命令
bin/mysqld --initialize --user=mysql
可以很好的初始化,但是用在5.7.12版本居然报错
[root@centos mysql-5.7.12]# bin/mysqld --initialize --user=mysql
2016-04-28T09:50:25.142068Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-28T09:50:25.142323Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2016-04-28T09:50:25.144865Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2016-04-28T09:50:25.144934Z 0 [ERROR] Aborting
后来发现centos自带的/etc/my.cnf和/etc/mysql没有删掉,后来删掉这两个文件之后在此使用这个命令
仍然报错
mysqld: Can't create directory '/usr/local/mysql/data/' (Errcode: 2 - No such file or directory)
2016-04-28T09:53:24.465575Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2016-04-28T09:53:24.467928Z 0 [ERROR] Aborting
后来在网上一查发现使用mysqld命令时要初始化
应该在mysql祝文件夹下创建data文件,但是记得在5.7.11版本里面的data文件是自动生成的
mkdir data
然后执行下面一句
bin/mysqld --user=mysql --basedir=/usr/local/mysql-5.7.12 --datadir=/usr/local/mysql-5.7.12/data/ --initialize
2016-04-28T10:01:07.730549Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-28T10:01:08.194212Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-04-28T10:01:08.725913Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-04-28T10:01:08.810579Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 213135a4-0d28-11e6-b869-000c299613e3.
2016-04-28T10:01:08.816207Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-04-28T10:01:08.819712Z 1 [Note] A temporary password is generated for root@localhost: %?kTFF<e8XXL
这算是成功了把,给出了初始密码,接下来把support-files/my-default.cnf复制到/etc/下,并配置一下
就可以了!
mysql 5.7.12----bin/mysqld --initialize --user=mysql出错的更多相关文章
- mysql初始化时报错bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory的处理
问题描述: 今天新安装了一个linux虚拟机,然后安装mysql 5.7.21,在进行初始化的时候,报错 bin/mysqld: error : cannot open shared object f ...
- mysql初始化/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
[root@test153 ~]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql - ...
- Mysql 5.7.12解压版的安装及配置系统编码
这篇博文是由于上篇EF+MySql博文引发的,上篇博文中在Seed方法中插入中文数据到Mysql数据库中乱码,后来网上找了N种方法也没解决.重装了MySql并在安装过程中配置了系统编码,此篇记录一下. ...
- 【Linux】CentOS 7.4 安装 MySQL 8.0.12 解压版
安装环境/工具 1.Linux(CentOS 7.4版) 2.mysql-8.0.12-el7-x86_64.tar.gz 安装步骤 参考:https://dev.mysql.com/doc/refm ...
- Python3.7和数据库MySQL 8.0.12 绿色解压 安装教程(一)
首先要安装MySQL 数据库才可以继续安装图形工具SQLyog 第一步:下载解压包>> MYSQL官网地址:https://dev.mysql.com/downloads/file/?id ...
- CentOS 7 编译 mysql 8.0.12
步骤一:安装mysql依赖 yum install -y libaio numactl 步骤二:下载mysql社区版 wget https://dev.mysql.com/get/Downloads/ ...
- 集群架构03·MySQL初识,mysql8.0环境安装,mysql多实例
官方网址 https://dev.mysql.com/downloads/mysql/社区版本分析 MySQL5.5:默认存储引擎改为InnoDB,提高性能和可扩展性,增加半同步复制 MySQL5.6 ...
- mysql更改数据文件目录及my.ini位置| MySQL命令详解
需求:更改mysql数据数据文件目录及my.ini位置. 步骤: 1.查找my.ini位置,可通过windows服务所对应mysql启动项,查看其对应属性->可执行文件路径,获取my.ini路径 ...
- ubuntu16.04系统彻底卸载mysql,并源码免编译重装MySQL的步骤
今天的总结 ubuntu上彻底卸载MySQL或重新安装 https://www.jianshu.com/p/974b33873bca #查看是否存在mysql服务 service mysql stat ...
随机推荐
- (三)Linux Shell编程——Shell常用命令(输出、判断、循环、函数、包含)
3. 常用命令 3.1 输出 3.1.1 echo命令 echo是Shell的一个内部指令,用于在屏幕上打印出指定的字符串.命令格式: echo arg name="coding" ...
- reindex-maven 私服(nexus)架设以及项目管理中遇到的问题及解决方案(updating)
--- 用maven 的过程中 大问题小问题实在是不少 ,就不一篇文章一篇文章的写了,干脆写在一起 ---- ------- nexus 加索引 点击Administration菜单下面的Re ...
- Swift3.0生成二维码、扫描二维码、相册读取二维码,兼容iOS7(结合ZXingObjC)
二维码生成 //MARK: 传进去字符串,生成二维码图片(>=iOS7) text:要生成的二维码内容 WH:二维码高宽 private func creatQRCodeImage(text: ...
- 微信小游戏“跳一跳”,Python“外挂”已上线
微信又一次不声不响地搞了个大事情: “小游戏”上线了! 于是,在这辞旧迎新的时刻,毫无意外的又火了. 今天有多少人刷了,让我看到你们的双手! 喏,我已经尽力了…… 不过没关系,你们跳的再好,在毫无心理 ...
- Java IDE选择,常用Java IDE排行榜
Java IDE众多,java开发主要用.最多用.国内较流行.本人常用的java IDE如下: 开发java大项目的IDE一般都用eclipse或netbeans(几乎我所在的公司都是在用eclips ...
- 把Android源代码加入SDK
各位调试Android程序的时候遇到“source not found”错误应该很抓狂吧,Goolge在发布SDK时没有把源代码包含进去着实有点让人费解,对很多人来说Git无疑是个生涩的东西,而 fr ...
- 在 Asp.NET MVC 中使用 SignalR 实现推送功能 [转]
在 Asp.NET MVC 中使用 SignalR 实现推送功能 罗朝辉 ( http://blog.csdn.net/kesalin ) CC许可,转载请注明出处 一,简介 Signal 是微软支持 ...
- python学习笔记——爬虫的抓取策略
1 深度优先算法 2 广度/宽度优先策略 3 完全二叉树遍历结果 深度优先遍历的结果:[1, 3, 5, 7, 9, 4, 12, 11, 2, 6, 14, 13, 8, 10] 广度优先遍历的结果 ...
- go学习 --- Chan (通道)
Golang使用Groutine和channels实现了CSP(Communicating Sequential Processes)模型,channles在goroutine的通信和同步中承担着重要 ...
- OGG_GoldenGate复杂参数定义(案例)
2014-03-10 Created By BaoXinjian