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

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.

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

报告相同问题?

悬赏问题

  • ¥20 为什么我写出来的绘图程序是这样的,有没有lao哥改一下
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥15 绘制多分类任务的roc曲线时只画出了一类的roc,其它的auc显示为nan
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败