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.

Blank Control Panel - MySql Error 1054: Unknown column 'username' in 'where clause'

February 05, 2011 1:25pm

Subscribe [5]
  • #1 / Feb 05, 2011 1:25pm

    birdie

    68 posts

    Hi,

    I am trying to reproduce a site on my local server (Mamp) for updates, but keep getting a blank screen after trying to log in to the Control Panel.

    After turning on error reporting, the error I see is:

    MySQL ERROR:

    Error Number: 1054

    Description: Unknown column ‘username’ in ‘where clause’

    Query: SELECT count(*) AS count FROM exp_password_lockout WHERE login_date > 1296926341 AND ip_address = ‘xxx.x.x.x’ AND (user_agent = ‘Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en’ OR username = ‘admin’ )

    (Changed username and IP)

    I see some people have similar issues on the forums but no fix. The website itself is visible, it’s just the Control Panel that is blank.

    I saw this bug report too, but I don’t see how it could be related, when the same username / password combo works fine on the live site.

    https://support.ellislab.com/bugs/detail/11156/

    EE 1.6.9
    Build:  20100430

    Thanks in advance.

    Cormac

  • #2 / Feb 06, 2011 4:33pm

    Greg Salt

    3988 posts

    Hi Cormac,

    Can you please launch PHPMyAdmin from MAMP and check the exp_members table in the DB. Has it been transferred correctly? Does its structure and data look exactly the same as the one on the live site?

    Cheers

    Greg

  • #3 / Feb 07, 2011 6:21am

    birdie

    68 posts

    Hi Greg,

    Everything looks identical in the exp_members table, all users are there with the correct usernames / passwords, structure is the same, collation too.

    Thanks,

    Cormac

  • #4 / Feb 07, 2011 7:30am

    Sue Crocker

    26054 posts

    What about the exp_password_lockout table?

  • #5 / Feb 07, 2011 10:36am

    birdie

    68 posts

    Identical, and empty on both local and live databases

  • #6 / Feb 08, 2011 3:48am

    John Henry Donovan

    12339 posts

    Cormac,

    Can you quickly summarize what you did to replicate the sites?
    Can you try deleting all the folders in expressionengine/cache leaving just the index.html

    Can you confirm you are connecting to your local db as opposed to your live one?

  • #7 / Feb 08, 2011 6:33am

    birdie

    68 posts

    Hi John,

    I did what I’d think is “the usual” process:

    * Download all the files from the server
    * Export the live database via PHPMyAdmin
    * Create a new db on local MAMP server, import contents from live db
    * Set permissions on the folders / config / path files
    * Edit the config file

    The only thing I can think of that might make a difference on the local version is that I’d added the files to an SVN Repo, but I can’t see how that would effect the database, which seems to be where the issue is.

    I triple checked the config database settings and also tried recreating a second local db with the same results, so I’m certain that It wasn’t looking for the live db. This is hosted with Blacknight too and they don’t allow external access to the db without specifically setting it up, so I don’t think it would have worked at all if that was the case.

    The version that isn’t working is on a laptop that I left at home today, so I’m going through the whole process fresh this morning on a different machine, I’ll let you know how it goes.

    Cheers,

    Cormac

  • #8 / Feb 08, 2011 11:08am

    birdie

    68 posts

    Quick update on this - I followed the same process on two sites today, including the one that had the blank CP, and didn’t have the same issue. I was very careful not to copy anything down from the cache, so maybe that was
    the difference, I’ll take a look at the first copy later to confirm.

    Still an odd one though, I have done the same thing loads of times without worrying about whats in the cache (I ALWAYS forget to empty it. Every time.) and this is the first time it’s happened. 

    Cheers,

    Cormac

  • #9 / Feb 08, 2011 4:07pm

    Ingmar

    29245 posts

    Sounds good. Please let us know what you find out.

  • #10 / Feb 08, 2011 5:11pm

    birdie

    68 posts

    Hi Ingmar,

    There were some entries in the cache on the local version, but deleting them made no difference, and I still get the error. At this stage I have a working copy elsewhere so I’m not going to lose any sleep over it!

    Thanks for trying to help, hopefully this won’t come up again.

    Cheers,

    Cormac

  • #11 / Feb 09, 2011 1:42am

    John Henry Donovan

    12339 posts

    Thanks for the update Cormac. Closing this one out for now. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases