MySQL安装启动时报错一则
来源:互联网 发布:七夕情人节html源码 编辑:程序博客网 时间:2024/05/17 09:21
问题:
[root@hadoop0 rpm]# rpm -ivh MySQL-server-5.6.28-1.el6.x86_64.rpm
warning: MySQL-server-5.6.28-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
--但启动时报错
[root@hadoop0 rpm]# mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@hadoop0 rpm]# service mysql start
Starting MySQL..... ERROR! The server quit without updating PID file (/var/lib/mysql/hadoop0.pid).
[root@hadoop0 mysql]# cd /var/lib/mysql/
[root@hadoop0 mysql]# vi hadoop0.err
2016-05-16 14:11:01 3839 [Note] InnoDB: 128 rollback segment(s) are active.
2016-05-16 14:11:01 3839 [Note] InnoDB: Waiting for purge to start
2016-05-16 14:11:01 3839 [Note] InnoDB: 5.6.28 started; log sequence number 1600607
2016-05-16 14:11:01 3839 [Note] Server hostname (bind-address): '*'; port: 3306
2016-05-16 14:11:01 3839 [Note] IPv6 is available.
2016-05-16 14:11:01 3839 [Note] - '::' resolves to '::';
2016-05-16 14:11:01 3839 [Note] Server socket created on IP: '::'.
2016-05-16 14:11:01 3839 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
160516 14:11:01 mysqld_safe mysqld from pid file /var/lib/mysql/hadoop0.pid ended
解决:初始化数据库
[root@hadoop0 ~]# mysql_install_db --user=mysql
Installing MySQL system tables...2016-05-16 14:22:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-16 14:22:45 0 [Note] /usr/sbin/mysqld (mysqld 5.6.28) starting as process 3906 ...
2016-05-16 14:22:45 3906 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-05-16 14:22:45 3906 [Note] InnoDB: The InnoDB memory heap is disabled
2016-05-16 14:22:45 3906 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-05-16 14:22:45 3906 [Note] InnoDB: Memory barrier is not used
2016-05-16 14:22:45 3906 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-05-16 14:22:45 3906 [Note] InnoDB: Using Linux native AIO
2016-05-16 14:22:45 3906 [Note] InnoDB: Using CPU crc32 instructions
2016-05-16 14:22:45 3906 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-05-16 14:22:45 3906 [Note] InnoDB: Completed initialization of buffer pool
登录正常
[root@hadoop0 ~]# mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Bye
0 0
- MySQL安装启动时报错一则
- CentOS7mini 安装MySQL5.6启动时报错:Starting MySQL. ERROR!
- Genymotion安装启动时报错问题
- MySQL Server 无法启动错误诊断一则
- centos 安装mysql,启动时报错Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
- mysql安装时报start service错。解决办法~
- AS安装后不能启动,启动时报错
- mysql启动时报1067错误
- 安装数据库MySQL/MongoDB,启动时报错‘发生系统错误2’或者服务没有响应控制功能的解决办法
- Eclipse启动时报错
- 启动时报错
- sonar启动时报错
- Eclipse启动时报错
- 启动时报错出错
- 启动tomcat时报错
- JBOSS启动时报错
- JBoss启动时报错
- Eclipse启动时报错
- C++第10/11周项目 继承与派生 【是春哥啊】(复习新版)
- ES6的一些新特性
- Qt应用程序中如何设置字符编码
- BestCoder Round #83 1004 && HDU-5683 zxa and xor (水)
- 解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
- MySQL安装启动时报错一则
- linux文件权限的总结
- 【SSH网上商城项目实战18】过滤器实现购物登录功能的判断
- gateway 默认路由获取与设置
- 337. House Robber III
- Android permission
- 不该忽视的影响SEO效果的“硬件”——服务器性能!
- 欢迎使用CSDN-markdown编辑器
- 如何通俗的理解java的依赖注入!