码迷,mamicode.com
首页 > Web开发 > 详细

(phpmyadmin error)Login without a password is forbidden by configuration (see AllowNoPassword) in ubuntu

时间:2015-10-18 22:41:50      阅读:815      评论:0      收藏:0      [点我收藏+]

标签:

1.Go to /etc/phpmyadmin/config.inc.php and open it your favorite editor. 

2.Search for below line of code 

//$cfg[‘Servers‘][$i][‘AllowNoPassword‘] = TRUE;

code lines will be looks like :-

if (!empty($dbname)) {
 //More code here
/* Uncomment the following to enable logging in to passwordless accounts,
 * after taking note of the associated security risks. */
  // $cfg[‘Servers‘][$i][‘AllowNoPassword‘] = TRUE;
/* Advance to next server for rest of config */
    $i++;
}

And    uncomment the    //$cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE; (just remove “//” from start) to make login in phpmyadmin with password 

/* Uncomment the following to enable logging in to passwordless accounts,
 * after taking note of the associated security risks. */
 $cfg[‘Servers‘][$i][‘AllowNoPassword‘] = TRUE;

Note :-If you are using older version of php then may be there is another same line of code so you need to uncomment also these lines like 

if (!empty($dbname)) {
  // other configuration options
  $cfg[‘Servers‘][$i][‘AllowNoPassword‘] = TRUE;
  $i++;
}
// another code found here
$cfg[‘Servers‘][$i][‘AllowNoPassword‘] = TRUE;

3.Save your file and done try to login your phpmyadmin without password. If you still have issue try to restart your apache services by following command. For more    How to restart apache ubuntu  

sudo service apache2 restart

4.If you still facing issue you need reinstall mysql again by running following command through terminal. For more    How to install mysql?  

sudo apt-get install mysql-server mysql-common mysql-client

And run your phpmyadmin and login without password now you are done you have fixed error    Login without a password is forbidden by configuration (see AllowNoPassword) in ubuntu .

(phpmyadmin error)Login without a password is forbidden by configuration (see AllowNoPassword) in ubuntu

标签:

原文地址:http://www.cnblogs.com/haoliansheng/p/4890341.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!