User can only login on localhost.

Codes here !

Moderators: macek, egami, gesf

Post Reply
seandisanti
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.

Post by 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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests