无法修改 config.inc.php
Can not modify config.inc.php
我在 phpmyadmin 中更改了 root 密码(实际上没有密码),现在当我转到 phpmyadmin 时,我收到此错误:
MySQL 说:文档
Cannot connect: invalid settings. mysqli_real_connect():
(HY000/1045): Access denied for user 'root'@'localhost' (using
password: NO) phpMyAdmin tried to connect to the MySQL server, and
the server rejected the connection. You should check the host,
username and password in your configuration and make sure that they
correspond to the information given by the administrator of the MySQL
server.
我去config.inc.php那里添加了密码,但是修改后不能保存config.inc.php,说明我没有足够的权限保存。
我去了 google 并搜索了问题。我尝试通过 644 终端更改权限,但它对我不起作用。
我什至尝试重新安装 XAMPP,但我仍然遇到同样的错误。
现在我的电脑上装了phpmyadmin,完全不能用,也改不了
请帮帮我,我该如何解决?
我也在使用 Mac 和 XAMPP。
打开Mac命令shell.
使用 cd
命令将目录设置为 config.inc.php
文件的位置。
键入以下命令:
sudo nano config.inc.php
系统会要求您输入密码;输入它。这会将命令置于管理员模式。
这将在命令 window 中打开 Nano 文本编辑器,您可以在其中编辑文件。找到密码字段(如果需要搜索,使用ctrl+w
),编辑它,然后使用ctrl+x
保存并退出。您现在应该可以再次使用 phpMyAdmin。
看起来当我们在 mac 上安装 Xampp 时,它会尝试使用它自己的终端,默认情况下它不会使用 nano。
我已经完成了以下适合我的步骤。
- 打开终端window(不是mac默认终端,请查看附图)
然后在新打开的终端中运行apt-get update
。这将更新一些内部依赖项,例如
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Get:3 http://security.debian.org stretch/updates/main amd64 Packages [475 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7090 kB]
Get:7 http://security.debian.org stretch/updates/main Translation-en [210 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main Translation-en [5388 kB]
Fetched 13.4 MB in 54s (245 kB/s)
Reading package lists... Done
然后 运行 apt-get install nano
这将安装 nano
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
spell
The following NEW packages will be installed:
nano
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 485 kB of archives.
After this operation, 2092 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 nano amd64 2.7.4-1 [485 kB]
Fetched 485 kB in 3s (130 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package nano.
(Reading database ... 13080 files and directories currently installed.)
Preparing to unpack .../nano_2.7.4-1_amd64.deb ...
Unpacking nano (2.7.4-1) ...
Setting up nano (2.7.4-1) ..
CD 到 cd ../opt/lampp/phpmyadmin
Open/Edit nano config.inc.php
并保存。
这种方式对我有用:)
我也有同样的问题,只需按照步骤一步步解决这个问题
- 在 macOs
上用 Xampp 打开 CMD
- apt-get更新
- apt-get 安装 nano
- nano /opt/lampp/phpmyadmin/config.inc.php(并更改密码或其他)
- 使用 CTRL + O 保存
我在 phpmyadmin 中更改了 root 密码(实际上没有密码),现在当我转到 phpmyadmin 时,我收到此错误:
MySQL 说:文档
Cannot connect: invalid settings. mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
我去config.inc.php那里添加了密码,但是修改后不能保存config.inc.php,说明我没有足够的权限保存。
我去了 google 并搜索了问题。我尝试通过 644 终端更改权限,但它对我不起作用。
我什至尝试重新安装 XAMPP,但我仍然遇到同样的错误。
现在我的电脑上装了phpmyadmin,完全不能用,也改不了
请帮帮我,我该如何解决?
我也在使用 Mac 和 XAMPP。
打开Mac命令shell.
使用
cd
命令将目录设置为config.inc.php
文件的位置。键入以下命令:
sudo nano config.inc.php
系统会要求您输入密码;输入它。这会将命令置于管理员模式。
这将在命令 window 中打开 Nano 文本编辑器,您可以在其中编辑文件。找到密码字段(如果需要搜索,使用
ctrl+w
),编辑它,然后使用ctrl+x
保存并退出。您现在应该可以再次使用 phpMyAdmin。
看起来当我们在 mac 上安装 Xampp 时,它会尝试使用它自己的终端,默认情况下它不会使用 nano。
我已经完成了以下适合我的步骤。
- 打开终端window(不是mac默认终端,请查看附图)
然后在新打开的终端中运行
apt-get update
。这将更新一些内部依赖项,例如Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB] Get:3 http://security.debian.org stretch/updates/main amd64 Packages [475 kB] Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB] Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B] Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7090 kB] Get:7 http://security.debian.org stretch/updates/main Translation-en [210 kB] Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main Translation-en [5388 kB] Fetched 13.4 MB in 54s (245 kB/s) Reading package lists... Done
然后 运行
apt-get install nano
这将安装 nanoReading package lists... Done Building dependency tree Reading state information... Done Suggested packages: spell The following NEW packages will be installed: nano 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 485 kB of archives. After this operation, 2092 kB of additional disk space will be used. Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 nano amd64 2.7.4-1 [485 kB] Fetched 485 kB in 3s (130 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = (unset) are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package nano. (Reading database ... 13080 files and directories currently installed.) Preparing to unpack .../nano_2.7.4-1_amd64.deb ... Unpacking nano (2.7.4-1) ... Setting up nano (2.7.4-1) ..
CD 到
cd ../opt/lampp/phpmyadmin
Open/Edit
nano config.inc.php
并保存。
这种方式对我有用:)
我也有同样的问题,只需按照步骤一步步解决这个问题
- 在 macOs 上用 Xampp 打开 CMD
- apt-get更新
- apt-get 安装 nano
- nano /opt/lampp/phpmyadmin/config.inc.php(并更改密码或其他)
- 使用 CTRL + O 保存