MySQL安装启动时报错一则
--成功安装
[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
相关热词:
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/sql/10856.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
因为之前遇到过不能保存
时间:2021-01-20
-
centos下输入呼吁不能有中
时间:2021-01-20
-
如下: #chkconfig --list 实际
时间:2021-01-20
-
qtbase、plugins、sqldrivers、
时间:2021-01-20
-
围绕着内存数据库的4个流
时间:2021-01-06
-
MySQL NoSQL–Memcached插件
时间:2021-01-06
-
MySQL安装启动时报错一则
时间:2020-12-29
-
mysql5.7.12 utf-8字符编码问题
时间:2020-12-29
热门文章
-
如何下载旧版本的MySQL
时间:2020-12-22
-
MySQL NoSQL–Memcached插件
时间:2021-01-06
-
MySQL安装启动时报错一则
时间:2020-12-29
-
完美解决servlet传数据到绿色版的mySQL的汉
时间:2020-12-28
-
Neo4j和图数据库起步
时间:2020-12-22
-
Linux Centos7下如何确认MySQL服务已经启动
时间:2020-12-22
-
解决数据库保存中文数据后变'???'
时间:2020-12-22
-
centos下输入命令不能有中文那么我怎么插
时间:2020-12-22
-
为初学者准备的MariaDB管理命令
时间:2020-12-22
-
解决"MySQL server PID file could not be found"问
时间:2020-12-22
