简体   繁体   English

数据库:无法连接到joomla 1.5中的MySQLDatabase

[英]database:Could not connect to MySQLDatabase in joomla 1.5

I'm moving an old joomla site from a server to another, this site was not written by me. 我要将一个旧的joomla网站从一台服务器移到另一个服务器,该网站不是我写的。
I had installed lamp on a new ubuntu server machine, I had deployed the entire application inside the htdocs of lampp root, and I had imported the database into the new mysql. 我已经在新的ubuntu服务器计算机上安装了lamp,在lampp root的htdocs中部署了整个应用程序,并将数据库导入了新的mysql。 I have created a user with the same credentials of hte user that I had found in the configuration.php file. 我创建了一个具有与configuration.php文件中相同的hte用​​户凭据的用户。
To be sure that the credentials working I had try to access to the mysql database with those and everything works fine. 为了确保凭据有效,我尝试使用这些凭据访问mysql数据库,并且一切正常。 Under the host i had put 'localhost' because the db is on the same machine of the application, but i had tried to use the ip address of the server, opening the mysql port, and nothing... I still get the same error. 在主机下,我放置了“ localhost”,因为数据库位于应用程序的同一台计算机上,但是我尝试使用服务器的ip地址,打开mysql端口,什么也没有...我仍然遇到相同的错误。
I had tried to find on stackoverflow and on the web too, but i always find that the problem is about the configuration, but i really look a lot at it and everything seems rigth to me. 我曾尝试在stackoverflow和Web上找到它,但是我总是发现问题出在配置上,但是我的确看了很多,一切对我来说都是严峻的。
What could it be? 会是什么呢? Is there any place where i can get more details about the error? 在哪里可以获得有关该错误的更多详细信息? A log file?(like incorrect login? or database not found?) 日志文件?(例如错误的登录名?还是找不到数据库?)
I would really like to solve this problem by my self, but i really don't know where to find more info. 我真的很想自行解决此问题,但我真的不知道在哪里可以找到更多信息。

By default, MySQL stores errors under /var/lib/mysql - you can check there. 默认情况下,MySQL将错误存储在/ var / lib / mysql下-您可以在此处检查。

Some questions: 一些问题:

  • Is your configuration.php file using mysql or mysqli ? 您的configuration.php文件是使用mysql还是mysqli Have you tried switching one to the other? 您是否尝试过将一个切换到另一个?
  • What will happen if you create a simple PHP file (in your site's main directory) with a script that connects to the database? 如果使用连接数据库的脚本创建一个简单的PHP文件(在站点的主目录中),将会发生什么?
  • Are you sure that the user has write access to the #__session table? 您确定用户具有对#__session表的写访问权吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM