Board logo

标题: [求助] 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确 [打印本页]

作者: tszfzz    时间: 2013-7-2 18:32     标题: 无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确

错误提示
* MySQL manager or server PID file could not be found!
Starting MySQL
. * Manager of pid-file quit without updating file.
下面是错误日志
130702 01:31:25 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.63/var
130702  1:31:25 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
130702  1:31:25 [ERROR] Aborting
130702  1:31:25 [Note] /www/wdlinux/mysql-5.1.63/libexec/mysqld: Shutdown complete
130702 01:31:25 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.63/var/ubuntu.pid ended
130702 01:45:44 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.63/var
130702  1:45:44 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
130702  1:45:44 [ERROR] Aborting
130702  1:45:44 [Note] /www/wdlinux/mysql-5.1.63/libexec/mysqld: Shutdown complete
130702 01:45:44 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.63/var/ubuntu.pid ended
130702 01:53:31 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.63/var
130702  1:53:31 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
130702  1:53:31 [ERROR] Aborting
130702  1:53:31 [Note] /www/wdlinux/mysql-5.1.63/libexec/mysqld: Shutdown complete
130702 01:53:31 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.63/var/ubuntu.pid ended
130702 18:24:56 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql-5.1.63/var
130702 18:24:56 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!
130702 18:24:56 [ERROR] Aborting
130702 18:24:56 [Note] /www/wdlinux/mysql-5.1.63/libexec/mysqld: Shutdown complete
130702 18:24:56 mysqld_safe mysqld from pid file /www/wdlinux/mysql-5.1.63/var/ubuntu.pid ended
作者: tszfzz    时间: 2013-7-2 18:32

在线求助  重装也不行
作者: admin    时间: 2013-7-2 19:14

useradd mysql
chown -R mysql.mysql /www/wdlinux/mysql-5.1.63/var
service mysqld restart
作者: tszfzz    时间: 2013-7-2 19:32

root@ubuntu:~# useradd mysql
useradd: group mysql exists - if you want to add this user to that group, use -g.
root@ubuntu:~# chown -R mysql.mysql /www/wdlinux/mysql-5.1.63/var
chown: invalid user: `mysql.mysql'
root@ubuntu:~# service mysqld restart
* MySQL manager or server PID file could not be found!
Starting MySQL
. * Manager of pid-file quit without updating file.
作者: tszfzz    时间: 2013-7-2 19:33

ubuntu12.04 64位系统
作者: tszfzz    时间: 2013-7-2 19:42

mysql 已经成功启动 ok
作者: tszfzz    时间: 2013-7-2 19:51

phpmysql.jpg 这是要输入 什么密码  mysql?不对。文件权限?  也不对啊

图片附件: [phpmyadmin] phpmysql.jpg (2013-7-2 19:50, 26 KB) / 下载次数 7568
http://wdlinux.cn/bbs/attachment.php?aid=3171&k=22e5cdccf962b60a43cb780cb2a3aa0e&t=1733332374&sid=dhnJHY


作者: tszfzz    时间: 2013-7-2 19:52

:8080/phpmyadmin
作者: tszfzz    时间: 2013-7-2 20:37

已经解决 root密码 不正确  不知道是什么 sh /www/wdlinux/tools/mysql_root_chg.sh  搞定。然后恢复wdcpdb.sql
作者: tszfzz    时间: 2013-7-2 21:52

不对啊 wdcpdb.sql  就这?

-- MySQL dump 10.13  Distrib 5.1.63, for unknown-linux-gnu (x86_64)
--
-- Host: localhost    Database: wdcpdb
-- ------------------------------------------------------
-- Server version        5.1.63

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-07-02 21:47:10
作者: tszfzz    时间: 2013-7-2 22:06

找到一个 sql文件 /root/lanmp/www/wdlinux/wdcp  ok
作者: tszfzz    时间: 2013-7-2 23:42

为什么 wdcp 修改文件 创建文件都失败呢




欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/) Powered by Discuz! 7.2