phpmyadmin Wrong permissions on configuration file, should not be world writable!

巴拉巴拉,实际场景是这样,因为有需要,所以想用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出问题之后 修改了一些权限导致的问题,作为一个错误记录下来,在实在是找不到问题的时候这个倒是可以用,因为时间总是有限的不可能在这个错误上耗费太多时间

时间: 2024-08-11 05:30:13

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

Wrong permissions on configuration file, should not be world writable!

今天在服务器上访问phpMyAdmin,出现这样的提示 Wrong permissions on configuration file, should not be world writable! 查资料一看,原来phpMyAdmin要在755权限下才能正常工作(777不行).所以解决办法也就来了: SSH,cd到phpMyAdmin上级目录, chmod -R 755 phpMyAdmin OK啦!忘记了以前吧整个目录都设置成777的权限了……

log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. log4j版本:log4j-core-2.7.jar   log4j-api-2.7.jar log4j2只支持xml和json两种格式的配置,所以配置log4j.properties时,是没有作用的. log4j 2.0与以往的1.x有一个明显的不同,其配置

Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging

在做struts2时导包完成发现Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging log4j2的配置文件没找到去struts2-blank下.WEB-INF\classes下找到log4j的配置文件log4j2.xml:把他放入src中

im-switch -s ibus错误:Error: no configuration file "ibus" exists.

在虚拟机上安装Ubuntu14.04 后安装ibus输入法,万万没想到在切换输入法的时候居然出错了! 无语了,再网上查了一下,这个错误出现的还是比较少的. 先说Ubuntu输入法(ibus)安装的一般步骤吧. 一.安装语言包 System Settings-->Language Support-->Install/Remove Languages 安装时间会稍微长一点.完成后注销一下. 如果不想安装中文语言包,则需要安装中文字体: $ sudo apt-get install ttf-wqy-

VMware强制关闭,造成(failed to get exclusive lock on the configuration file...)错误

参考文章:http://blog.csdn.net/qyee16/article/details/6764753 笔记本蓝屏,造成VMware非法关闭,开机重启VMware后,发现无法打开虚拟机了,报错如下: 点击确定后,出现Internal Error错误: 解决办法很简单,打开任务管理器 --> 进程,然后把所有vmware相关的进程都关闭,在重新打开vmware就好了: 红框中为需要关闭的进程 VMware强制关闭,造成(failed to get exclusive lock on th

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 configuration file win32-g++.Error processing project file: my.pro -------------------------------------------------------------------- 其实是丢失了以前的静态库路径. 办法: D:\S

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 asking for help with locating the configuration file used by one of their production MySQL instances. From the description I was given it appeared th

Could not parse configuration: file:/D:/apache-tomcat-7.0.55-windows-x64/apache-tomcat-7.0.55/webapp

在做ssh项目时,启动tomcat,出现了以下的错误 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ins

Configuration File (php.ini) Path Loaded Configuration File 都有加载php.ini文件,有什么不同的地方?

Configuration File (php.ini) Path /usr/local/php7/etc      这个目录下面也有php.ini文件(如果在编译./configure -with-config-file-path=/usr/local/php56/etc 指定了该参数的话) ,php-fpm启动是不加载该php.ini文件的Loaded Configuration File /usr/local/php7/lib/php.ini    这个是php-fpm启动加载的php.i