- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在带有 Nginx 的 Centos 7 上安装了 mysql-community-server-8.0.13-1.el7.x86_64
,并添加了 phpMyAdmin 来管理数据库,但我一直收到错误 Cannot从 phpMyAdmin 登录到 MySQL 服务器
。我尝试了以下方法,现在已经苦苦挣扎了几天:
更改了一些位于 /etc/phpMyAdmin/config.inc.php
的参数(在 stackoverflow 上建议),如下所示,但没有成功:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
我试过 mysql shell,我可以用 root
和其他用户登录。但是,我不知道为什么它在 phpMyAdmin 上失败。请帮助并感谢!
最佳答案
我通过执行以下操作解决了这个问题:(我应该提到这个解决方案适用于 MySQL 8.0.13 和 phpMyAdmin 4.8.4 - 两者,今天的最新版本)
1- 我使用这些服务器参数(仅)编辑了 config.inc.php
:
/*** This is needed for cookie based authentication to encrypt password in
cookie. Needs to be 32 chars long. */
$cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
2- 在 MySQL 终端上
//Create a new user:
mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';
//Grant all privileges:
mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;
//Flush all privileges:
mysql> FLUSH PRIVILEGES;
//Change authentication_string with password:
mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
'your_password';
//Login with the new user and password!
这应该允许您登录到 phpMyAdmin。希望对您有所帮助!
关于nginx - Centos 7上phpMyAdmin无法登录MySQL服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54030283/
在 phpMyAdmin 的设置过程中,创建了一个 phpMyAdmin 用户,当我查看 phpMyAdmin 数据库权限时,我可以看到该用户。哪个 PHP 文件存储了该用户的密码? 最佳答案 保罗,
如何删除 phpMyAdmin 中的框架? 最佳答案 打开/usr/share/phpmyadmin/index.php(它在我的 Ubuntu 机器上)。不要忘记使用 sudo 或成为 root。
我读过官方文档说 phpMyAdmin 应该安装在 Web 服务器的文档根目录中。 我想问一下我是否必须为我拥有的每个 DocumentRoot 放置一个 phpMyAdmin,或者是否有一个很好的解
在遵循 youtube 上的 2019 教程后,无法在 virtualbox 上滚动的 kali linux 上安装 phpmyadmin, 尝试过 sudo apt-get install phpm
请帮忙,我总是在经历所有这些事情时遇到麻烦。当我只需要 phpmyadmin 有一个登录表单时,我就可以输入密码和用户名。 我不需要本文档中包含的所有内容。是否有针对初学者的教程,介绍如何在 phpm
标题几乎总结了我的问题。 我只想了解如何禁用远程登录到我的 phpmyadmin。 我宁愿只能从本地主机登录到 phpmyadmin。 最佳答案 编辑 /etc/phpmyadmin/apache.c
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我创建了具有两列(id、name)的数据库(产品)表项目,并且我向该列添加了值,然后显示此错误 Warning in .\libraries\DisplayResults.php#869 A non
我想将 SELECT 查询的结果导出为有效的 SQL INSERTS,并将其导入到另一个数据库中(某些记录被意外删除)。通常我会使用 PHPMyAdmin 的导出功能,但 PHPMyAdmin 在其中
当我尝试从 phpMyAdmin 导出数据库时出现错误。 请引用下面的截图。 我不知道这个问题是怎么发生的。 最佳答案 我遇到了同样的问题,我通过增加 php.ini 中 'max_input_var
无法访问 phpMyAdmin。我的 wampserver 版本是 2.2,使用 Windows 7。 localhost/phpmyadmin/ 当我打开它。 Internet Explorer 打
在我的工作中,我有 phpmyadmin 要使用的 SQL 数据库(本地和服务器上) 烦人的问题是,当我修改本地数据库结构(列、关系、新表)时,我不得不在服务器数据库上再次重做修改,因为当我备份本地数
我不喜欢 phpMyAdmin 中新的 AJAX 风格的导航树,我想将其更改为旧的。是否有一些我可以更改的配置指令? 旧版本:3.3.7 新版本:4.0.4 两者中的原始主题。 最佳答案 没有配置指令
我正在尝试更改 phpmyadmin 中的日期格式。我无法更改格式 我想将格式更改为 dd-mmm-yyyy。如何更改日期格式。请帮我解决它.. 最佳答案 您可以使用 phpMyAdmin 的 bro
我想在 PhpMyAdmin 中为包含此文本的所有字段更改文本“pelecard”。表名是 sales_flat_order_payment。我怎么能做到这一点? 谢谢你 最佳答案 SQL 是什么?
在远程 ubuntu 18 服务器上,当从其中一个表中打开 phpmyadmin 中的数据时,它会显示警告和弹出窗口(如 https://imgur.com/a/b5HGGV0 ),这是非常缺乏的..
默认情况下,phpMyAdmin 中的“主题”选项仅影响主题设置更改的浏览器的主题(可能存储在 cookie 中?)。如何将特定主题设置为所有用户的默认主题? 最佳答案 可以从 phpMyAdmin
我的表有全文列。如何设置列的默认宽度?我知道它在 index.php 页面顶部有完整/部分文本按钮...如何永久设置该值? 谢谢! 最佳答案 有一个名为 LimitChars 的配置值:http://
我是 mysql 的新手,所以我正在使用 phpmyadmin 在数据库中创建表。我有枚举类型的字段制造商,可能的值为“manufacturer1”,“manufacturer2”,... 我选择了
有谁知道是否或如何增加phpMyAdmin 中的导入大小限制?目前我的服务器限制为 50MB。 请注意,这与 php.ini 中的 upload_max_filesize 不同。该值设置为 2MB。
我是一名优秀的程序员,十分优秀!