ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

New Install – Cannot connect to database

October 24, 2011 7:34pm

Subscribe [7]
  • #1 / Oct 24, 2011 7:34pm

    camillew

    67 posts

    I have done many installations –– and this one I have gone over and over and cannot figure out why it’s not working.  I’m getting this message:

    A Database Error Occurred
    Unable to connect to your database server using the provided settings.
    Filename: controllers/wizard.php
    Line Number: 1518

    and I have gone over and over the settings –– they are correct, and I’m using the database address, not ‘localhost’, etc.  Yet I continue to get this error on a clean, brand new install, with a host that I have many other EE licenses installed on.

    What could I be missing??

  • #2 / Oct 25, 2011 10:26am

    Mark Bowen

    12637 posts

    Hi Camille,

    Could you edit the system > expressionengine > utilities > dbtest.php file and then run that in your browser and let us know what message you get please.

    You say that you’re using the database address instead of localhost here. Does it not work if you use localhost then?

    Thanks,

    Mark

  • #3 / Oct 25, 2011 4:57pm

    camillew

    67 posts

    I ran the ee_wizard and one requirement came up as not supported by the host, this one:

    MySQL (Version 4.1+) support in PHP

    But I’ve used this same host for numbers of other EE sites, and when I go to the MySQL panel, it says that it’s:
    MySQL client version: 5.0.45 and
    Server version: 5.1.51-community-log

    All other requirements are supported by host
    and then the error at the bottom of the wizard report just says “Unable to connect to database”

  • #4 / Oct 26, 2011 11:06am

    Mark Bowen

    12637 posts

    Hi Camille,

    Which host is this that you are trying to install this site on?

    The site that you are trying to install is this a different version to the sites already hosted on that server?

    I’m just wondering if perhaps the MySQL panel can say one thing but there is maybe a local value somewhere which means you’re not actually using that version and if the sites you had previously installed didn’t need such a high version of MySQL then perhaps this could be the problem here?

    You might be able to perhaps log in to one of your existing sites and go to the PHP Info page in the Control Panel and see what version that reports the server as running.

    I do believe that this may not always report the actual version which is being used on the site though as on some hosts you can change the version using a line in a .htaccess file or the php.ini file. You don’t have anything like that in your older sites at all do you?

    You may wish to ask your host on the above though as they would have a better idea of what is going on here.

    Thanks,

    Mark

  • #5 / Oct 26, 2011 2:04pm

    camillew

    67 posts

    Thanks for the tips.  I’ve got an inquiry in with the host, IX Web Hosting.  I’ve checked another site, looks like it’s running the higher version, so it remains a mystery for now.  This could be on a different server that the host is running.  I know I’ve had different sites on different servers with them before. I’ll report back.

  • #6 / Oct 28, 2011 2:30pm

    Lisa Wess

    20502 posts

    Thanks Camille.  Let us know what you find out!

  • #7 / Nov 04, 2011 12:16pm

    graefika

    5 posts

    I am having this exact same issue. My install of 2.2.2 was working just fine. I tried upgrading to 2.3.1 and the whole thing went south. I keep getting spanked over and over with this message:

    “A Database Error Occurred
    Unable to connect to your database server using the provided settings.

    Filename: controllers/wizard.php

    Line Number: 1518

    « Back”

    This is some Installation Wizard weirdness that I have been unable to fix. My host has even tried to fix it - nothing has worked.

    I added the shebang bit from this link, too:
    http://expressionengine.com/legacy_docs/installation/troubleshooting.html

    My host tech support even showed me what my server was running in an effort to debug this thing: http://awesomescreenshot.com/014nj43db

    I have even tried re-running the installer with another browser - NOT Firefox and I have gotten nowhere.

    Can someone help me fix this? I am days overdue.

    :(

    The broken page is: http://www.geauxsicles.com/admin.php?C=wizard&M=do_install&language=english

  • #8 / Nov 04, 2011 1:48pm

    MerryK

    14 posts

    I’m also getting the ‘Line Number: 1518’ error when trying to update from 2.1.3.
    I wouldn’t be surprised if it’s a problem I made for myself, because (as usual) I made a few errors along the way, including overwriting database.php. However I’m pretty sure I was able to recreate database.php properly, as I have another site with the same host.

    I ran the dbtest and the result was..

    A connection was established to your database server
    Your database was selected.

    I’m not sure if that’s good news or not!

    ... I’ve just cleared the database and tried to do a clean install. Same error message, same result from running dbtest.

  • #9 / Nov 07, 2011 2:15pm

    JHager

    3 posts

    I am having this same issue on a new install 2.3.1.

    A Database Error Occurred
    Unable to connect to your database server using the provided settings.
    Filename: controllers/wizard.php
    Line Number: 1518

    My host is running PHP 5.2.17 and MySQL 5.1.50

    Has anybody found a solution for this?

    Thanks!

  • #10 / Nov 07, 2011 2:45pm

    Sue Crocker

    26054 posts

    graefika, it looks like you’re no longer working with an admin.php file. Who are you hosted with?

    MerryK - so dbtest worked, but not the actual 2.3.1 brand new install?

    JHager - you’ll need to contact your host, the wizard is giving you an error message outside of EE. Let’s see if we can have them assist you so that the wizard works as expected.

  • #11 / Nov 07, 2011 3:29pm

    JHager

    3 posts

    Hi Sue,
    Thank you for the reply. If the host is running MySQL 5.1.50 but the ee wizard gives a “No” to the MySQL requirement, what specifically do I need to ask the host about that the ee wizard says is not being support? Is there a permission I need to reference or…?
    Thanks for your help.

  • #12 / Nov 07, 2011 3:40pm

    graefika

    5 posts

    Sue, I ended up pulling my 2.1.3 EE files from an earlier August backup.

    I went into my server and deleted everything and started completely over from scratch. I loaded my 2.1.3 EE files back onto the server, reran the EE Server Wizard and got all green Yes’s. I proceeded to then load up and install 2.1.3 seemingly without incident. Now, when I log in I see a Security Warning in my CP instructing me to immediately download and upgrade to EE 2.2.2 - Build 20110801.

    Once I got my 2.1.3 installation locked down, I just stopped. I have not proceeded to upgrading to 2.2.2 until I heard back from someone. I will re-try upgrading again to 2.2.2 later this evening, tracking progress so I can document errors.

    My shared server environment is with this host: http://www.asmallorange.com/

    I have installed earlier versions of EE on this host before and have never had problems like I had last week, so I’m curious as to what changed in this latest EE v2x build.

  • #13 / Nov 07, 2011 8:16pm

    graefika

    5 posts

    Sue:
    I just went back in and reloaded - slowly, step by step. Making a backup and copying back the config.php and database.php files seemed to solve the ‘can’t connect to database’ error message I kept getting.

    So far it is working. Back up your site! If I had not had the foresight to do that, today would have been horribly, horribly bad.

    Good luck, others.

  • #14 / Nov 09, 2011 2:17pm

    Sue Crocker

    26054 posts

    JHager - I have no issues with MySQL version 5.1.44, but don’t have 5.1.50 to test against. Are you testing with EE 2.3.1?

  • #15 / Oct 14, 2012 12:09pm

    jim03

    2 posts

    Im having a very simular problem.
    Iv been on to my hosting company. They have checked and said everything is good.
    I think Im just missing something very small. so Ill ask the stupid question.
    To log into the sql server on the installiation wizard do I just use the name or do I have to put the “hxxx_” before it. Also does this appily to username,login and db name.
    At this stage any help or tips would be great

    Tks

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases