在WAMP中更改MySQL端口号后,PHPMyAdmin页面错误 [英] PHPMyAdmin page error after change MySQL port number in WAMP
问题描述
我在服务器计算机上安装了带有现有MySQL版本的IIS.现在,我想安装WAMP来托管magento网站.
I have IIS installed with an existing MySQL version on my server computer. Now I want to install WAMP to host magento sites.
在我安装WAMP并将apache端口从80更改为8090之后,位于wamp服务器上的所有magento站点都可以正常工作.但是我所有的IIS php站点都无法连接到旧的MySQL数据库.
After I installed WAMP and changed the apache port from 80 to 8090, all the magento sites siting on wamp server works fine. But all my IIS php sites cannot connect to the old MySQL database.
因此,我被要求在WAMP中更改新MySQL的端口.
So I was requested to change the port of the new MySQL in WAMP.
我用新的端口号3307更改了my.ini文件,然后重新启动了wamp服务.服务器图标为绿色,但是当我访问phpMyAdmin页面时,收到一条错误消息,提示#1045-用户'root'@'localhost'的访问被拒绝(使用密码:NO)".
I changed the my.ini file with the new port number 3307, then I restarted wamp service. The server icon is green, but when I visit the phpMyAdmin page, I got an error message saying "#1045 - Access denied for user 'root'@'localhost' (using password: NO)".
我在goolge上进行了搜索,并使用端口= 3307更改了config.inc.php文件,再次重新启动了服务.但是我仍然遇到相同的错误.
I searched on goolge and changed the config.inc.php file with port = 3307, restarted service again. But I still got the same error.
是否需要更改其他内容才能使其在phpMyAdmin页面上正常工作?预先感谢.
Is there anything else needs to be changed to get it working on the phpMyAdmin page? Thanks in advance.
推荐答案
您可以尝试一些方法.
- 您是否刷新了浏览器缓存(CTRL + F5)
- 您是否更改了
my.ini
的正确部分
- Have you refreshed your Browser Cache ( CTRL + F5 )
- Did you change the correct section of
my.ini
找到my.ini
的此部分并在那里更改端口号
Locate this section of my.ini
and chnage the port number there
# The MySQL server
[wampmysqld]
port = 3307
也可以找到本节
# The following options will be passed to all MySQL clients
[client]
port = 3307
并在那里更改端口.
重新启动MySQL,现在phpMyAdmin应该有一个要与之对话的服务器.另外,如果您使用命令行访问mysql,它也会查找正确的服务器.
Restart MySQL and now phpMyAdmin should have a server to talk to. Also if you use the command line access to mysql it will also be looking at the correct server.
这篇关于在WAMP中更改MySQL端口号后,PHPMyAdmin页面错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!