mysql5.7.17报错:ERROR! The server quit without updating PID file
来源:互联网 发布:加强网络舆情管理通知 编辑:程序博客网 时间:2024/05/29 09:58
今天重装了个虚拟机开发环境(Centos7.3),按照之前的方法安装最新版本的MySQL(5.7.17),在启动的时候报错:
[root@localhost ~]# /sbin/service mysqld start
Starting MySQL.Logging to ‘/data/mysqldata/localhost.localdomain.err’.
ERROR! The server quit without updating PID file (/data/mysqldata/localhost.localdomain.pid).
网上搜索一下,很多人遇到这种情况,并且很多是老版本的,并没有解决我的问题,最后在官网文档找到了答案:
https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html
shell> groupadd mysqlshell> useradd -r -g mysql -s /bin/false mysqlshell> cd /usr/localshell> tar zxvf /path/to/mysql-VERSION-OS.tar.gzshell> ln -s full-path-to-mysql-VERSION-OS mysqlshell> cd mysqlshell> mkdir mysql-filesshell> chmod 750 mysql-filesshell> chown -R mysql .shell> chgrp -R mysql .shell> bin/mysql_install_db --user=mysql # MySQL 5.7.5shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and upshell> bin/mysql_ssl_rsa_setup # MySQL 5.7.6 and upshell> chown -R root .shell> chown -R mysql data mysql-filesshell> bin/mysqld_safe --user=mysql &# Next command is optionalshell> cp support-files/mysql.server /etc/init.d/mysql.server
其中的 bin/mysqld –initialize –user=mysql 是关键,之前我安装的时候没有带 –user=mysql参数
其它部分的安装见之前的Blog:Centos下编译mysql5.6.16
设置密码
# /data/apps/mysql5.7.17/bin/mysqld_safe --skip-grant-tables &# mysql -uroot -pmysql> update user set authentication_string=password('666666') where user='root';mysql> flush privileges;mysql> quit;# service mysqld restart# mysql -uroot -p666666
这时如果报:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
可以再执行一下:
mysql> set password=password('666666');Query OK, 0 rows affected, 1 warning (0.01 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> exit;Bye
另:
密码 666666 是测试用,请不要在正式环境中用过于简单的密码。
另2:
Centos7.3的开机启动不执行,需要给rc.local加可执行权限。
chmod +x /etc/rc.d/rc.local
另3:
CSDN Blog的Markdown编辑器在Win10 Edge浏览器下完全不能正常使用。
- mysql5.7.17报错:ERROR! The server quit without updating PID file
- Mac OS X中启动MySQL报错:ERROR! The server quit without updating PID file
- Mac 上mysql启动报错Starting MySQL... ERROR! The server quit without updating PID file
- macbook下启动mysql报错 . ERROR! The server quit without updating PID file
- . ERROR! The server quit without updating PID file
- ERROR! The server quit without updating PID file!!!(已解决!!!)
- . ERROR! The server quit without updating PID file
- Starting MySQL. ERROR! The server quit without updating PID file
- . ERROR! The server quit without updating PID file
- Starting MySQL.... ERROR! The server quit without updating PID file
- ERROR! The server quit without updating PID file
- Starting MySQL.. ERROR! The server quit without updating PID file
- ERROR! The server quit without updating PID file.
- Starting MySQL. ERROR! The server quit without updating PID file......
- The server quit without updating PID file
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误的问题解决
- MYSQL启动后报:ERROR! The server quit without updating PID file错误
- 解决nginx负载均衡的session共享问题
- 本地包含配合文件上传
- 配置一个Lua工程(支持命令行运行 和 vs断点调试)
- Android检查当前网络状态是否可用并
- Android studio百度地图的使用
- mysql5.7.17报错:ERROR! The server quit without updating PID file
- The Overview of Rule Placement Problem in SDN(规则放置问题的概述)
- 解决Spring MVC @ResponseBody返回中文字符串乱码问题
- js,jq,css多方面实现简易Tab切换
- hanoi问题
- raspi-config command not found resolution
- 闭包(Closures)
- oracle基本命令集合(2)--单行函数
- super在对象的内部使用,代表父类对象