MySQL XAMPP MySQL密码设置(在PHPMYADMIN中不能输入)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22333581/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XAMPP MySQL password setting (Can not enter in PHPMYADMIN)
提问by Muhammad Ashikuzzaman
Firstly:I am cannot entering PHPMYADMIN at "localhost:80/phpmyadmin/". Because when I install MySQL server mysql-5.5.36 with Username :root and Password : HamdunSoft . After that when I enter localhost:80/phpmyadmin/ it show me a message like below .
首先:我无法在"localhost:80/phpmyadmin/"输入 PHPMYADMIN 。因为当我使用用户名:root 和密码:HamdunSoft 安装 MySQL 服务器 mysql-5.5.36 时。之后,当我输入 localhost:80/phpmyadmin/ 时,它会显示如下消息。
"Error MySQL said: Documentation 1045 - Access denied for user 'root'@'localhost' (using password: NO)Connection for controluser as defined in your configuration failed. 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."
“错误 MySQL 说:文档 1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:NO)配置中定义的 controluser 连接失败。phpMyAdmin 尝试连接到 MySQL 服务器,但服务器拒绝了该连接“你应该检查你配置中的主机、用户名和密码,并确保它们与MySQL服务器管理员提供的信息相对应。”
Now I want enter my Phpmyadmin though I have setup two MySQL server one in xampp, another mysql-5.5.36. I have searched it in net but the content was not helpful sufficiently. How can I set the password in xampp before login in phpmyadmin .
现在我想输入我的 Phpmyadmin,尽管我在 xampp 中设置了两个 MySQL 服务器,另一个是 mysql-5.5.36。我在网上搜索过,但内容不够有用。如何在登录 phpmyadmin 之前在 xampp 中设置密码。
Another different issue is:XAMPP Apache server was saying : port 80 is being used by some one. I solved it by stopping Skype. But again having this types of problem. I think like Skype another software is using port 80. I want to use any port with Apache as I wish. It may be port 80 or 81 or 82. If any other process is using my desired port I want to replace that and give that port to Apache.
另一个不同的问题是:XAMPP Apache 服务器说:端口 80 正在被某个人使用。我通过停止 Skype 解决了这个问题。但是又遇到了这种类型的问题。我认为像 Skype 一样,另一个软件正在使用端口 80。我想根据需要使用任何端口与 Apache。它可能是端口 80 或 81 或 82。如果任何其他进程正在使用我想要的端口,我想替换它并将该端口提供给 Apache。
采纳答案by Muhammad Ashikuzzaman
First Issue:You want to run Mysql server from Mysql and from Xampp also want to browse phpmyadmin so that you can operate database.Then follow the rules:
第一个问题:你想从Mysql运行Mysql server,从Xampp也想浏览phpmyadmin,这样你就可以操作数据库了。然后按照规则:
From "Xampp/phpmyadmin"directory in config.inc.phpfile find the below code. And follow the given instructions below. I have tried like this and I was successful to run both localhost/phpMyAdmin on browser, MySQL Command prompt as well as MySQL query browser.
从config.inc.php文件中的“Xampp/phpmyadmin”目录中找到以下代码。并按照下面给出的说明进行操作。我试过这样,我成功地在浏览器上运行 localhost/phpMyAdmin,MySQL 命令提示符以及 MySQL 查询浏览器。
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'pma';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['controluser'] = 'user_name/root';
$cfg['Servers'][$i]['controlpass'] = 'passwaord';
And replace the above each statement with the below each corresponding code.
并将上面的每个语句替换为下面的每个对应的代码。
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'Muhammad Ashikuzzaman';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'Muhammad Ashikuzzaman';
Second Issue:Way 1 :You can quit Skype first. And when Apche server is started then again you can run Skype. If you want to run Apache in another port then replace in xampp/apache/conf/httpd.conf "ServerName localhost:80" by "ServerName localhost:81" At line 184. After that even it may not work. Then replace
第二个问题:方法一:你可以先退出Skype。当 Apche 服务器启动时,您可以再次运行 Skype。如果你想在另一个端口运行 Apache,那么在 xampp/apache/conf/httpd.conf 中用“ServerName localhost:81”替换 xampp/apache/conf/httpd.conf 中的“ServerName localhost:81” 在第 184 行。之后它甚至可能无法工作。然后更换
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
by
经过
#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81
at line 45
在第 45 行
Way 2 :If you want to use port 80. Then follow this. In Windows 8 “World Wide Publishing Service is using this port and stopping this service will free the port 80 and you can connect Apache using this port. To stop the service go to the “Task manager –> Services tab”, right click the “World Wide Publishing Service” and stop. If you don't find there then go to "Run > services.msc" and again find there and right click the “World Wide Publishing Service” and stop.
方式2:如果你想使用80端口。然后按照这个。在 Windows 8 中,“World Wide Publishing Service 正在使用此端口,停止此服务将释放端口 80,您可以使用此端口连接 Apache。要停止该服务,请转到“任务管理器 -> 服务选项卡”,右键单击“全球发布服务”并停止。如果你没有找到那里然后去“运行> services.msc”并再次找到那里并右键单击“World Wide Publishing Service”并停止。
If you didn't find “World Wide Publishing Service” there then go to "Run>>resmon.exe>> Network Tab>>Listening Ports" and see which process is using port 80.
如果您没有找到“World Wide Publishing Service”,则转到“运行>>resmon.exe>>网络选项卡>>侦听端口”并查看哪个进程正在使用端口80。
And from "Overview>>CPU" just Right click on that process and click "End Process Tree". If that process is system that might be a critical issue.
从“概览>>CPU”中右键单击该进程并单击“结束进程树”。如果该过程是系统,则可能是一个关键问题。
回答by
Find the below code in xampp/phpmyadmin/config.inc.php
在 xampp/phpmyadmin/config.inc.php 中找到以下代码
$cfg['Servers'][$i]['controluser'] = 'user_name/root';
$cfg['Servers'][$i]['controlpass'] = 'passwaord';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'user_name/root';
$cfg['Servers'][$i]['password'] = 'password';
Replace each statement above with the corresponding entry below:
将上面的每个语句替换为下面的相应条目:
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'xxxx';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'xxxx';
Doing this caused localhost/phpmyadmin in the browser and the MySQL command prompt to work properly.
这样做会导致浏览器中的 localhost/phpmyadmin 和 MySQL 命令提示符正常工作。
回答by insCode
1.open your xampp dir ( c:/xampp )
1.打开你的xampp目录( c:/xampp )
2.to phpMyadmin dir [C:\xampp\phpMyAdmin]
2.到phpMyadmin目录[C:\xampp\phpMyAdmin]
3.open [ config.inc.php ] file with any text editor
3.用任意文本编辑器打开[config.inc.php]文件
$cfg['Servers'][$i]['auth_type'] = 'config'; //replace 'config' to ‘cookie'
$cfg['Servers'][$i]['AllowNoPassword'] = true; //change ‘true' to ‘false'.
last : save the file .
最后:保存文件。
here is a video linkin case you want to see it in Action [ click Here]
回答by Shuvojit Mazumdar
If all the other answers do not work for you check the config.inc.php
for the following:
如果所有其他答案都不适合您,请检查config.inc.php
以下内容:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
…and add the port of MySQL set in your XAMPP as shown below:
...并在您的 XAMPP 中添加 MySQL 的端口,如下所示:
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
Stop MySQL from XAMPP and restart MySQL.
从 XAMPP 停止 MySQL 并重新启动 MySQL。
Open a fresh page for http://localhost:8012/phpmyadmin/
and check.
打开一个新页面http://localhost:8012/phpmyadmin/
并检查。
回答by Waylon194
I know that this is an old question but I am just going to place this here:
我知道这是一个老问题,但我只想把它放在这里:
To prevent skype from using port 80 and port 443, open the Skype window, then click on the Tools menuand select Options.
Click on the Advanced tab, and go to the Connection sub-tab.
Uncheck the checkbox for Use port 80 and 443 as an alternative for additional incoming connections option.
Click on the Save buttonand then restart Skype.
After you restart skype, skype wont use port 88 or 443 anymore.
要防止 Skype 使用端口 80 和端口 443,请打开 Skype 窗口,然后单击“工具”菜单并选择“选项”。
单击高级选项卡b,然后转到连接子选项卡。
取消选中使用端口 80 和 443 作为其他传入连接选项的替代复选框。
单击“保存”按钮,然后重新启动 Skype。
重新启动 Skype 后,Skype 将不再使用端口 88 或 443。
Hope this might help someone.
希望这可以帮助某人。
回答by Dung
If you can not authenticate via the web interface (localhost/phpmyadmin/) then try change authentication type to cookie.
如果您无法通过 Web 界面 (localhost/phpmyadmin/) 进行身份验证,请尝试将身份验证类型更改为 cookie。
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
回答by Rahul Shinde
MySQL multiple instances present on Ubuntu.
Ubuntu 上存在 MySQL 多个实例。
step 1 : if it's listed as installed, you got it. Else you need to get it.
第 1 步:如果它被列为已安装,你就明白了。否则你需要得到它。
sudo ps -A | grep mysql
须藤ps -A | mysql
step 2 : remove the one MySQL
第 2 步:删除一个 MySQL
sudo apt-get remove mysql
sudo apt-get 删除 mysql
sudo service mysql restart
须藤服务 mysql 重启
step 3 : restart lamp
第 3 步:重启灯
sudo /opt/lampp/lampp restart
须藤 /opt/lampp/lampp 重启
回答by Andrew Atkinson
user: root
用户:root
password: [blank]
密码:[空白]
XAMPP v3.2.2
XAMPP v3.2.2