SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool localhost error, Database connection error (2): Could not connect to MySQL

    Hi everyone!

    I am working on a Joomla! 2.5 video training course. I had been going along with the videos smoothly until one day I went to http://localhost and instead of seeing my usual Joomla! Home screen, Instead I was greated by the message; "Database connection error (2): Could not connect to MySQL." I am using the XAMPP stack on my computer running Windows 8 Pro.

    In my Xampp folder, htdocs folder, in my Configuration.php file, these are my settings (as directed in my video course, setting recommendations):

    public $dbtype = 'mysql';
    public $host = 'localhost';
    public $user = 'root';
    public $password = '';
    public $db = 'Joomla25';

    Then, If I Look in the 'Logs' Folder in My Xampp directory, I find a file titled 'error' within it says this:

    Joomla FAILURE: Username and password do not match or you do not have an account yet.
    2013-05-12 05:51:22


    So.... I am wondering if anyone could help me to figure out how I can make sure my settings in my configuration.php file match up. I just don't know what they need to match up with.... something in my MySql or PhpMyAdmin folders?? I am not sure.... any help is really appreciated. Thank You!

  2. #2
    SitePoint Addict
    Join Date
    Oct 2008
    Location
    Virtual World is my location
    Posts
    308
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    When you open http://localhost does XAMPP open? If yes or no next step is to go to your XAMPP installation folder and open xampp-control. See if Apache and MySQL are running. and check the ports. If its showing multiple ports for mysql etc even then it might not be connecting correctly.
    Try going to APACHE and MySQL admin from there and see if that works.

    Usually what happens is sometimes you add a new software that might use the same port and due to that, there are issues. You can manually start the ports by xampp-control and hopefully the solution should work.
    RecipesNext.com - recipes, kitchen queries, videos & more...
    BargainNext.com - coupons / deals / bargains / offers & more...

  3. #3
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. What I ended up doing is uninstalling xampp and installing wamp (which is what they use in the video course) which seemed to have a positive effect.... I do believe your diagnosis was accurate however, that another program may have been interfering with the connection. I had installed Comodo free anti virus which caused all sorts of quirky behavior, including now what believe was the localhost issue. I have since unistalled that and gone back to Microsoft security essentials. That anti virus was really bad, messed with my computer's DNS settings and prevented me from running programs. Creepy big brother type stuff. Well anyway, thank you kindly for your response, it is truly appreciated and of the highest value.

  4. #4
    SitePoint Member
    Join Date
    Apr 2013
    Location
    Melbourne, Australia
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xamp give problem many time try wamp or you can reinstall xampp to.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •