Joomla on Apache MWSQL issue

Posted on 2010-01-08
Last Modified: 2012-05-08
Ok, heres what i have, I installed a LAMP server on ubuntu 8.10 server.  I installed php and Joomla and got the joomla site up and another php shopping site all working fine on this server. my company paid for a web design person to design a joomla site.  I got the site today, uploaded it via webmin, created the mysql database and then went into the mysql tab of webmin, execute sql from file and pointed it to the database provided.  and the Jos_ tables etc all load fine.  but I am still getting  "Database Error: Unable to connect to the database:Could not connect to MySQL"  I am attaching the config.php. Could someone look at it and see if i'm missing something?

Question by:jasonmichel
    LVL 10

    Expert Comment

    In the file there is database password missing. Did you remove intentionally or is that the reason the site cannot connect to the database?
    LVL 5

    Accepted Solution


    change in the file:

    var $log_path =
    var $tmp_path =

    to be relative to server path.


    set your DB password in this variable which is currently empty.

    var $password =

    Additionaly check whether your "database name" have any "prefix".........

    let me know it works buddy :)
    LVL 1

    Author Comment

    i noticed that too, but when i tried to put the password var in it gave  a different error when loading, something about not being able to change it after the fact. the developer didn't specify there was a db password.  What do you mean by prefix for the database name?
    LVL 10

    Assisted Solution

    If there is no password on the database you have another - security this time - problem. Please check it. Try using some tools (e.g MySQL Workbench)  to see if you can connect to the database and see it's content.

    Sometimes when you have multiple CMS (like joomla) in one database they use various prefixes for their tables.
    LVL 1

    Author Closing Comment

    thanks for the help, but i figured it out, when i tried to add the Var $password i got an error that it can't duplicate. it wasn't supposed to have a DB password, farther down the config there was a var $session_handler = 'database'; with a var $password under it, so i put the dba password in there and voila it worked...thanks for the help though!

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now