巴拉巴拉,实际场景是这样,因为有需要,所以想用django 做个rest服务给其他平台提供服务,发现以前正常的页面都无法运行,奇怪发现有一个页面提示连接不上mysql 难道mysql挂了,打开phpmyadmin 提示如标题,进入到init.d 准备查看下状态 提示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) 咦,mysql 坏了,连接不上了,

提示大概是这样的

  

File './mysql-bin.~rec~' not found (Errcode: 13)
[ERROR] MYSQL_BIN_LOG::open_purge_index_file failed to open register file.
[ERROR] MYSQL_BIN_LOG::open_index_file failed to sync the index file.

找到对应的文件夹,发现还在里面,修改了权限之后发现用sudo 可以把服务启动了,然后回过来刷新,phpmyadmin 依然不行,网上看了下 90%说phpmyadmin 运行需要755权限,修改之后依然不行,真是给跪了。http://www.davinder.in/blog/wrong-permissions-configuration-file-should-not-be-world-writable 后来在这里看到作者写的 果然打开/usr/share/phpmyadmin/libraries/Config.class.php 找到提示语这几行 在1129L 是在

   function checkPermissions()
{
// Check for permissions (on platforms that support it):
if ($this->get('CheckConfigurationPermissions')) {
$perms = @fileperms($this->getSource());
if (!($perms === false) && ($perms & 2)) {
// This check is normally done after loading configuration
$this->checkWebServerOs();
if ($this->get('PMA_IS_WINDOWS') == 0) {
$this->source_mtime = 0;
/* Gettext is possibly still not loaded */
/*if (function_exists('__')) {
$msg = __('Wrong permissions on configuration file, should not be world writable!9999');
} else {
$msg = 'Wrong permissions on configuration file, should not be world writable!';
}
PMA_fatalError($msg);*/
}
}
}
}

直接这几行注释掉,终于进来了。 还有另外一种解决方案:

  

$cfg['CheckConfigurationPermissions'] = false;

这个在官网的文档里也有说明,不过在我加上去之后依然没有用,不过可能对其他人有用,这里提下。

我的原因估计是权限乱掉了,只是我修改了也没啥用,只能走走歪路子了,权限一直挺正常的,预计是上次hadoop出问题之后 修改了一些权限导致的问题,作为一个错误记录下来,在实在是找不到问题的时候这个倒是可以用,因为时间总是有限的不可能在这个错误上耗费太多时间

phpmyadmin Wrong permissions on configuration file, should not be world writable!的更多相关文章

  1. [Bug]IIs Cannot read configuration file due to insufficient permissions

    摘要 在部署站点的时候,遇到这样的问题Cannot read configuration file due to insufficient permissions 解决办法 在服务器上部署站点,浏览的 ...

  2. 解决Scala Play框架在Git Bash运行的异常:Could not find configuration file ../framework/sbt/sbt.boot.properties

    Git Bash+ConEmu可以模拟Linux强大的命令行.不过在结合Scala和Play时,需要注意如下事项: 1. Scala的安装在64位操作系统下,默认会放在“C:\Program File ...

  3. Error: Cannot open main configuration file '//start' for reading! 解决办法

    当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...

  4. springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件

    今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...

  5. Nginx - Configuration File Syntax

    Configuration Directives The Nginx configuration file can be described as a list of directives organ ...

  6. How to find configuration file MySQL uses?

    http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today ...

  7. This configuration file was broken by system-config-keyboard

    posts • Page of problem with startx Postby evarie » // :: Normally i can get started with the x wind ...

  8. PHP 5.6启动失败failed to open configuration file '/usr/local/php/etc/php-fpm.conf'

    PHP编译安装完毕,启动失败,提示 [-Jun- ::] ERROR: failed to open configuration ) [-Jun- ::] ERROR: failed to load ...

  9. Could not find qmake configuration file win32-g++

    D:\Source>c:\Qt\Qt5.3.2_static\bin\qmake -makefile -o Makefile my.proCould not find qmake configu ...

随机推荐

  1. Spring ioc容器

    一.ioc容器 ioc (inversion of  control)即控制反转,把某一个接口选择实现类的控制权转移给Spring容器来管理.调用类对该实现类的依赖关系由ioc容器注入(DI),传统的 ...

  2. 用c和c++的方式实现栈

    #include <stdio.h> #include <stdlib.h> #include <assert.h> struct LinkNode { int d ...

  3. Mac 安装mysql5.7 注意事项

    下载与安装  去mysql官网(http://dev.mysql.com/downloads/mysql/)下载自己Mac相对应 MySQL Community  下载下来接压之后你会发现mysql就 ...

  4. 第五章 springboot + mybatis(转载)

    本编博客转发自:http://www.cnblogs.com/java-zhao/p/5350021.html springboot集成了springJDBC与JPA,但是没有集成mybatis,所以 ...

  5. QT5.2.1大BUG

    本来以为5.2.1是release版本 谁知道编译某个程序,执行老是crash 换5.3.2就ok了. 坑啊

  6. 转载 - Vultr VPS注册开通且一键快速安装PPTP VPN和电脑连接使用

    本文转载来自:https://www.vultrclub.com/139.html 从2014年Vultr VPS进入市场之后,作为有背景.实力的搅局者,是的最近两年VPS.服务器的用户成本降低.配置 ...

  7. pip 安装 lxml 出错

    用pip安装 lxml 老是出错,在公司安装了 wheel,从 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下载了lxml的whl包,pip ins ...

  8. C# 抓取网站数据

    项目主管说这是项目中的一个亮点(无语...), 类似于爬虫一类的东西,模拟登陆后台系统,获取需要的数据.然后就开始研究这个. 之前有一些数据抓取的经验,抓取流程无非:设置参数->服务端发送请求- ...

  9. 如何用VB.Net创建一个三层的数据库应用程序

    [b]1.[/b][b]概论:[/b] 本文将介绍如何创建一个三层应用程序,并且将介绍如何创建一个Web Service服务. ADO.NET创建Windows三层结构应用程序的体系架构如下图所示: ...

  10. Debian 8下vsftpd安装与配置

    Debian 8下vsftpd安装与配置 0.环境 root@remote:/# uname -r 3.16.0-4-amd64 root@remote:/e# lsb_release No LSB ...