重复的站点不是从新数据库工作,而是从旧数据库工作 [英] Duplicated site not working from new db but does from old db

查看:67
本文介绍了重复的站点不是从新数据库工作,而是从旧数据库工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




在使用mysql 4.0的Windows 2000服务器上运行一个站点。它已被复制到运行Windows 2003和mysql 4.1的新服务器上。数据库已完整复制。当我修改db配置文件以连接到旧的Win 2000站点数据库时,新站点运行正常。但是当我更改配置文件以使用新数据库时,该网站无法正常工作,我得到一个空白页面,没有源代码。有关可能发生的事情的任何建议吗?


提前谢谢。

Hi,

There is a site running on a Windows 2000 server with mysql 4.0. It''s been copied to a new server running Windows 2003 and mysql 4.1. The database has been copied in its entirety. When I modify the db config file to connect to the old Win 2000 site db, the new site runs fine. But when I change the config file to use the new db, the site doesn''t work, I get a blank page and no source code. Any suggestions as to what might be happening?

Thanks in advance.

推荐答案

嗨。


什么语言是您的网站是用什么写的?

您可能需要打开错误消息才能看到发生了什么。


新服务器是否允许远程连接?

您需要确保服务器本身允许远程访问端口3306(除非您更改了MySQL端口)。如果您的服务器有防火墙,则可能会在默认情况下阻止它。

并确保允许您用于连接MySQL的用户远程连接。
Hi.

What language is your site written in?
You may have to turn on error messages to see what is going on.

Does the new server allow remote connections?
You need to make sure that the server itself allows remote access to port 3306 (unless you changed the MySQL port). If you server has a firewall, it is likely to block this by default.
And make sure the user you are using to connect to MySQL is allowed to connect remotely.


该网站是在PHP中。我打开错误消息并记录错误,我检查了日志文件,没有消息。没有错误显示。我创建了一个主机设置为Any Host的用户。我已经测试了连接...如果db连接参数错误,我收到一条错误消息。所以我知道该站点正在连接到数据库。 db和站点文件位于同一台服务器上。
The site is in php. I turned error messages on and errors are logged, and I checked the log files and there are no messages. No errors display. I created a user with host set to Any Host. I already test the connection... if the db connection parameters are wrong I get an error message. So I know that site is connecting to the database. The db and site files are on the same server.


确定。


您是否尝试过运行某些站点可以手动运行的查询?

这至少会告诉你数据库是否正常工作。


你能告诉我们连接数据库的代码吗?

如果数据库工作正常,你可以连接到它,那么问题可能在于PHP而不是MySQL。
Ok.

Have you tried running some of the queries your site would run manually?
That would at least tell you if the database is working properly.

Could you show us the code that is connecting to the database?
If the database is working, and you can connect to it, then the problem could be with PHP rather than MySQL.


这篇关于重复的站点不是从新数据库工作,而是从旧数据库工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆