巴拉巴拉,实际场景是这样,因为有需要,所以想用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. Android长时间后台运行Service

         项目需要在后台获取GPS经纬度.当用户对手机有一段时间没有操作后,屏幕(Screen)将从高亮(Bright)变为暗淡(Dim),如果再过段时间没操作, 屏幕(Screen)将又由暗淡(Di ...

  2. django搭建论坛之一环境配置

    环境情况: Description:    Ubuntu 15.04   Python版本:   Python 2.7.9 django版本: 1.8.4 安装django: pip install ...

  3. 随部分div增高总的div也随着增高

    实现效果: 随着尺码框选项变多,高度也就增加,上边总体的大框高度也增加,简单的样式代码如下 代码: <div style=“height: auto; overflow: hidden;”> ...

  4. Android框架之AndroidAnnotations实战

    方案一: 下载 androidannotations-bundle-3.3.2.zip 方案二:   楼主选用开发环境:android studio 新建项目  修改app 下的build.gradl ...

  5. PHP的继承方法如何获取子类名

    http://blog.csdn.net/zls986992484/article/details/53154097 PHP后期静态绑定问题:例如 <?php class A { functio ...

  6. base64/62 加解密的实现。

    base64/62加解密代码下载地址: http://files.cnblogs.com/files/Kingfans/base64(62)加解密.zip base64: base62:

  7. IOS git 的安装

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/instal ...

  8. 关于Oracle中查询的数字值的显示格式需要保留小数点后两位(或者三位,及其他位数)

    关于Oracle中查询的数字值的显示格式需要保留小数点后两位(或者三位,及其... 方法一:使用to_char的fm格式,即: to_char(round(data.amount,2),'FM9999 ...

  9. TColor 与 RGB 的转换函数

    function RGB2TColor(const R, G, B: Byte): Integer;begin  // convert hexa-decimal values to RGB  Resu ...

  10. 硬浮点 VFP

    http://blog.chinaunix.net/uid-27875-id-3449290.html   编译器对VFP的支持一个浮点数操作最后是翻译成VFP指令,还是翻译成fpa,或者是softf ...