User can only login on localhost.

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Nov 26, 2012 1:13 pm

User can only login on localhost.

Postby Alohaphp » Mon Nov 26, 2012 1:21 pm

I would like to ask for some help. It is really basic stuff but it seams i can't figure that part out.

1) I have a php application, where after login user gets to back-end area.
2) The problem is i can login on my localhost and i will see the back-end area, but after setting up staging server i can't get to that area.... error says "User ID or Password you entered is not correct".

What it could be? Any help would be much appreciated.

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: User can only login on localhost.

Postby seandisanti » Tue Nov 27, 2012 9:29 am

With that error, it could be only one of two things... either the user id or the password is incorrect. :D sorry, way too easy of a setup. Make sure that the user name you're using is setup and given permissions. If you have mysql console access, you can do it with:

Code: Select all

GRANT ALL PRIVILEGES ON db1.* TO 'jeffrey'@'localhost' IDENTIFIED BY 'apassword';

that will create the user and set password and grant privileges unless you have no autocreate on. To use that though you'd have to have access to the database to run the query in the first place. Assuming you don't, if you have cpanel, you may have an option there for 'php databases' going in there will allow you to see the databases you've got defined. If you haven't done it already, you can create your database user there, then scroll down the page to assign the user to the correct database, and a little further to set permissions. A lot of times hosts will prefix the database and user names with some portion of your domain, make sure to watch for that and adjust your code accordingly

Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 1 guest