(phpmyadmin error)Login without a password is forbidden by configuration (see AllowNoPassword) in ubuntu
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 .
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决