Mysql-5.7.10启动失败 。
Mysql-5.7.10在免安装后启动服务失败。
查看日志得到如下:
2016-02-19T03:41:05.557095Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-02-19T03:41:05.557095Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2016-02-19T03:41:05.557095Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2016-02-19T03:41:05.557095Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-02-19T03:41:05.557095Z 0 [Note] C:\MySql\mysql-5.7.10-winx64\bin\mysqld (mysqld 5.7.10) starting as process 7164 ...
2016-02-19T03:41:05.573096Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-02-19T03:41:05.574096Z 0 [Note] InnoDB: Uses event mutexes
2016-02-19T03:41:05.574096Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2016-02-19T03:41:05.575096Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-02-19T03:41:05.576096Z 0 [Note] InnoDB: Number of pools: 1
2016-02-19T03:41:05.576096Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-02-19T03:41:05.620099Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-02-19T03:41:05.632099Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-02-19T03:41:05.712104Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-19T03:41:05.814110Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-02-19T03:41:05.815110Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-02-19T03:41:05.857112Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2016-02-19T03:41:05.859112Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-02-19T03:41:05.860112Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-02-19T03:41:05.862113Z 0 [Note] InnoDB: 5.7.10 started; log sequence number 1210198
2016-02-19T03:41:05.863113Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\MySql\mysql-5.7.10-winx64\data\ib_buffer_pool
2016-02-19T03:41:05.864113Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-02-19T03:41:05.864113Z 0 [Note] InnoDB: not started
mysqld: Table 'mysql.plugin' doesn't exist
2016-02-19T03:41:05.865113Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-02-19T03:41:05.866113Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160219 11:41:05
2016-02-19T03:41:05.866113Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-02-19T03:41:05.867113Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-02-19T03:41:05.868113Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-02-19T03:41:05.870113Z 0 [Note] IPv6 is available.
2016-02-19T03:41:05.871113Z 0 [Note] - '::' resolves to '::';
2016-02-19T03:41:05.871113Z 0 [Note] Server socket created on IP: '::'.
2016-02-19T03:41:05.873113Z 0 [Warning] Failed to open optimizer cost constant tables 2016-02-19T03:41:05.874113Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2016-02-19T03:41:05.875113Z 0 [ERROR] Aborting 2016-02-19T03:41:05.875113Z 0 [Note] Binlog end
2016-02-19T03:41:05.875113Z 0 [Note] Shutting down plugin 'ngram'
2016-02-19T03:41:05.876113Z 0 [Note] Shutting down plugin 'partition'
2016-02-19T03:41:05.876113Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-02-19T03:41:05.876113Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-02-19T03:41:05.877113Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-02-19T03:41:05.877113Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-02-19T03:41:05.877113Z 0 [Note] Shutting down plugin 'MyISAM'
2016-02-19T03:41:05.878113Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-02-19T03:41:05.878113Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-02-19T03:41:05.879114Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2016-02-19T03:41:05.879114Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2016-02-19T03:41:05.879114Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-02-19T03:41:05.880114Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-02-19T03:41:05.880114Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-02-19T03:41:05.881114Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-02-19T03:41:05.881114Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2016-02-19T03:41:05.881114Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-02-19T03:41:05.882114Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2016-02-19T03:41:05.882114Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2016-02-19T03:41:05.883114Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-02-19T03:41:05.883114Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2016-02-19T03:41:05.883114Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-02-19T03:41:05.884114Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2016-02-19T03:41:05.884114Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-02-19T03:41:05.885114Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2016-02-19T03:41:05.885114Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2016-02-19T03:41:05.886114Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2016-02-19T03:41:05.886114Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-02-19T03:41:05.886114Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2016-02-19T03:41:05.887114Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-02-19T03:41:05.887114Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-02-19T03:41:05.888114Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-02-19T03:41:05.888114Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-02-19T03:41:05.888114Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-02-19T03:41:05.889114Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-02-19T03:41:05.889114Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-02-19T03:41:05.889114Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-02-19T03:41:05.890114Z 0 [Note] Shutting down plugin 'InnoDB'
2016-02-19T03:41:05.890114Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-02-19T03:41:05.890114Z 0 [Note] InnoDB: Starting shutdown...
2016-02-19T03:41:05.991120Z 0 [Note] InnoDB: Dumping buffer pool(s) to C:\MySql\mysql-5.7.10-winx64\data\ib_buffer_pool
2016-02-19T03:41:05.993120Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 160219 11:41:05
2016-02-19T03:41:07.311195Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1210217
2016-02-19T03:41:07.312196Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2016-02-19T03:41:07.314196Z 0 [Note] Shutting down plugin 'MEMORY'
2016-02-19T03:41:07.314196Z 0 [Note] Shutting down plugin 'CSV'
2016-02-19T03:41:07.315196Z 0 [Note] Shutting down plugin 'sha256_password'
2016-02-19T03:41:07.316196Z 0 [Note] Shutting down plugin 'mysql_native_password'
2016-02-19T03:41:07.316196Z 0 [Note] Shutting down plugin 'binlog'
2016-02-19T03:41:07.317196Z 0 [Note] C:\MySql\mysql-5.7.10-winx64\bin\mysqld: Shutdown complete
网上看了多信息仍未解决,最终去官网上找到了原因,原来data目录是我手工创建的,还必须执行如下命令进行初始化。
http://dev.mysql.com/doc/refman/5.7/en/windows-extract-archive.html
http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
To initialize the data directory, invoke mysqld with the --initialize or --initialize-insecure option, depending on whether you want the server to generate a random initial password for the 'root'@'localhost' account.
On Windows, use one of these commands:
C:\>bin\mysqld --initialize
C:\>bin\mysqld --initialize-insecure 这个命令会创建空密码的 root@localhost 账号,否则会创建带密码的 root@localhost 账号,密码直接写在 log-error 日志文件中
执行完这命令,
再执行 mysqld install MySQL --defaults-file="D:\Program Files\MySQL\mysql-5.6.13-win32\my.ini"
果然mysql服务就正常启动了。
记录下安装步骤:
添加环境变量
变量名:MYSQL_HOME
变量值:D:\Program Files\mysql-5.6.14-winx64
即为mysql的自定义解压目录。
再在Path中添加 %MYSQL_HOME%\bin
添加为服务:
从控制台进入到MySQL解压目录下的 bin 目录下:
bin\mysqld --initialize-insecure
输入服务安装命令:
mysqld install MySQL --defaults-file="D:\Program Files\MySQL\mysql-5.6.13-win32\my.ini"
#解压目录下修改的my.ini文件
安装成功后会提示服务安装成功。
#注:my.ini文件放在MySQL解压后的根目录下
#移除服务命令为:mysqld remove
附上myini文件:
[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
#解压目录
basedir=C:\MySql\mysql-5.7.10-winx64
#解压目录下data目录
datadir=C:\MySql\mysql-5.7.10-winx64\data
#没有这行在5.7中要这行,否则初始化时会有警告: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details).
explicit_defaults_for_timestamp=true
[WinMySQLAdmin]
C:\MySql\mysql-5.7.10-winx64\bin\mysqld.exe
Mysql-5.7.10启动失败 。的更多相关文章
- mysql 5.7.10 启动多实例笔记
1. 复制配置文件 cp /etc/my.cnf /etc/my3308.cnf 2. 修改配置文件 3. 创建目录, 并赋予权限 4. 初始化数据库 ---> 有报错 2018-01-03T0 ...
- 解决Mysql因内存不足启动失败的问题
参考:https://www.jb51.net/article/136432.htm 一.查看内存 free -h free -m 二.解决方法: 1.增加swap交换空间解决问题: dd if=/d ...
- docker PXC MYSQL集群节点启动失败/节点顺序消失/只剩一个节点存在问题的解决
转载于:https://my.oschina.net/u/4884318/blog/4908669 大牛 佩服此人 截取本人遇到的问题: "error:0407008A:rsa routin ...
- MySQL常见内存不足启动失败的完美解决方法
Move to https://www.jb51.net/article/136432.htm
- linux中mysql连接不上,服务启动失败等问题解决
confluence问题解决方式 1)针对confluence访问页面报500与连接失败等问题 首先我们登陆部署confluence的服器 10.15.4.115 2)重启mysql服务,发现重启失败 ...
- CentOS 7下MySQL服务启动失败的解决思路
今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...
- win10 MySQL启动失败问题
系统升级到win10之后,本地装的MySQL却突然不能启动,系统显示明明就有,可是总是启动失败.在这里解决一下: 解决win10 mysql服务消失,连接不上的问题,注意:以管理员身份运行DOS命令 ...
- mysql 启动失败
1 mysql 启动时报:MySQL Daemon failed to start.并且启动失败 2 查看mysql log日志 less /var/log/mysqld.log 3 从两行erro ...
- MySQL安装过程net start mysql 启动失败 报“错误2,系统找不到文件”的解决办法
MySQL安装过程net start mysql 启动失败 报“错误2,系统找不到文件”的解决办法 错误2,系统找不到文件. 开始...运行... regedit 注册表项: HKEY_LOCAL_ ...
随机推荐
- 像装软件一样装系统 Win8下怎么装Win7
像装软件一样装系统 Win8下怎么装Win7 首先,你需要一个Windows7的ISO镜像文件,非ghost版本 一般选中ISO文件,点反键在弹出菜单中以“装载”或“window资源管理器”方式打开 ...
- [svn]svn merge
转:http://blog.csdn.net/keda8997110/article/details/21813035 Step by Step 完成merge 目录: Branch的必要性 1.本地 ...
- java学习笔记(三)字符串
字符串String 创建方法: 一·通过new创建 String str1= new String("abc"); 二 直接创建 String str2="abc ...
- php CI框架nginx 配置
# ci server { listen 80; server_name my.clb.com; root /var/website/c ...
- PLSQL_基础系列03_合并操作UNION / UNION ALL / MINUS / INTERSET(案例)
2014-11-30 Created By BaoXinjian
- PLSQL_Oracle分区表和相应的分区索引管理和使用(案例)
2014-08-22 Created By BaoXinjian
- redis 安装并设置为开机启动服务
安装 1.下载redis,wget http://download.redis.io/releases/redis-3.0.1.tar.gz 解压:tar zxvf redis3.0.1.tar.gz ...
- ScrollView--嵌套GridView的解决办法
前些日子在开发中用到了需要ScrollView嵌套GridView的情况,由于这两款控件都自带滚动条,当他们碰到一起的时候便会出问题,即GridView会显示不全. 解决办法,自定义一个GridVie ...
- redmine后台运行命令
nohup ruby script/rails server webrick -e production & redmine 3 后台运行命令: nohup bundle exec rail ...
- 使用bs4对海投网内容信息进行提取并存入mongodb数据库
example: http://xyzp.haitou.cc/article/722427.html 首先是直接下载好每个页面,可以使用 os.system( "wget " ...