巴拉巴拉,实际场景是这样,因为有需要,所以想用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. 巧妙地用二叉树完成算式计算算法<计算器,二叉树,C++,独辟蹊径>

    #01.引言,我们知道算式计算的问题是栈里面一个非常经典的题目.但是用栈来实现是一个非常麻烦的过程,第一要解决算式判断,是否为符合规则的算式,第二要由中最表达式转化为后缀表达式.这两个部分是栈实现计算 ...

  2. Modern C++ CHAPTER 2(读书笔记)

    CHAPTER 2 Recipe 2-1. Initializing Variables Recipe 2-2. Initializing Objects with Initializer Lists ...

  3. Oracle数据库迁移到AWS云的方案

    当前云已经成为常态,越来越多的企业希望使用云来增加基础设施的弹性.减轻基础设施的维护压力,运维的成本等.很多企业使用云碰到的难题之一是如何将现有的应用迁移到云上,将现有应用的中间件系统.Web系统及其 ...

  4. DEV word文档转换为pdf文件

    引用aspose.net控件2.0. docement doc=new document(文件路径和名称); doc.save(输出路径\file.pdf);

  5. PoEdu - C++阶段班【Po学校】- Lesson02_类与对象_第4天

    复习:上节作业讲解 注意点: 设计SetString()的时候,要注意重置原来的空间. char * SetString(const char *str) { _len = strlen(str); ...

  6. cocoapods specs 镜像

    在使用cocoapods 进行update 或者 install的时候 每次回去更新获取的pod specs,每次速度都不是很理想,博主最近对github上的specs仓库进行了镜像,分别在gitca ...

  7. PIL show() 报错

    将 PIL 安装目录下的 ImageShow.py 文件的第 99 行:(我的 Python 安装在 D:\Program Files\python 2.6,那  ImageShow.py  文件在: ...

  8. myeclipse中UTF-8设置

      myeclipse中UTF-8设置 如果要使插件开发应用能有更好的国际化支持,能够最大程度的支持中文输出,则最好使 Java文件使用UTF-8编码.然而,Eclipse工作空间(workspace ...

  9. C# 通过身份证查询出生日期

    private int GetAgeBycode(string b_car_code) { string birthday = ""; //处理18位的身份证号码从号码中得到生日和 ...

  10. java中double变量保留小数问题

    (转载自玄影池扁舟) 做java项目的时候可能经常会遇到double类型变量保留小数的问题,下面便把我的经验做个简短的总结: java中double类型变量保留小数问题大体分两种情况: (一):小数点 ...