dongmian8108 2012-02-20 08:26
浏览 216
已采纳

Joomla数据库错误:无法连接

I have a hosting account on http://cpanel.byethost22.com . After I login to my vista panel, in the account information page it says that my Home Path is->

/home/vol3/byethost22.com/b22_10132649

And when I go to my file manager, a page shows up where I need to click on htdocs to see all my files.

Now the problem is I am trying to make a joomla website live on the host so I provided the following information in configuration.php file of joomla but when I hit my address ( http://sharkerection.byethost22.com ) on the browser it says "Database Error: Unable to connect to the database:Could not connect to MySQL"

var $log_path = '/home/vol3/byethost22.com/b22_10132649/htdocs/logs';
var $tmp_path = '/home/vol3/byethost22.com/b22_10132649/htdocs/tmp';
var $host = 'http://sharkerection.byethost22.com';
var $smtphost = 'localhost';

My Database username, password and database type.. all are correct but still its not working.

Could you please tell me if the problem is in var $log_path,var $tmp_path,var $host,var $smtphost

Thanks in Advance :)

  • 写回答

1条回答 默认 最新

  • dty97501 2012-02-20 09:29
    关注

    Try setting

    $host = 'localhost';
    

    The variable $host should not be the url to your site, but the address to your database.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?