Forum Moderators: open

Message Too Old, No Replies

my Sql

         

Carlitta87

8:21 pm on Aug 3, 2009 (gmt 0)

10+ Year Member



Im having a problem logging on, i keeps telling me about incorrect login and password. im stuck...

arlo

8:53 pm on Aug 3, 2009 (gmt 0)

10+ Year Member



is it a query you are working on? Can you paste the query here?

dreamcatcher

7:00 am on Aug 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Logging on where? via your control panel? phpmyadmin or other database program? or from your pc?

Hawkgirl

3:40 am on Aug 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am just starting to build a site that needs a mySQL database, and I am having a remote login problem, myself.

I used my host's 'quick install' to get mySQL and PhpMyAdmin up and running. Can log in fine from root, can create users, can create databases, can give users permission to specific databases ...

When I give the info to my contract guy (who can deal with installing HIS software if the mySQL is up and running, but can't seem to troubleshoot this one with me), he gets a login error. (Access denied for user 'name'@'localhost'. password YES)

I checked the login/password combo a zillion times. Checked permissions. I stopped and restarted mySQL. I uninstalled it and reinstalled it just in case I had the settings off from the get-go. I searched and searched for solutions, and have still only figured out that I am not cut out to handle this without a brain malfunction.

Every "solution" I've read in various places assumes I know far more than I actually do about PHP and databases. So I don't even know where to look. When it comes to this type of problem, I'm a driver, not a mechanic. I can change the oil but that's about it. I may have a feeling a wire is loose, somewhere, but I'm not sure where. I'm pretty sure I've got the right set of keys, though.

rocknbil

2:02 pm on Aug 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Access denied for user 'name'@'localhost'

Are you sure the database is local? This means on the same machine as the server, which is often not the case:

define('DB','database_name');
//define('DBHOST','localhost'); //OR
define('DBHOST','mysql.yourhost.com');

define('DBUSER','db_user);
define('DBPASSWORD','your-db-pass');

$link = mysql_pconnect(DBHOST,DBUSER,DBPASSWORD) or die ("Could not connect server");
mysql_select_db(DB,$link);

If the host is not found or improperly defined, it will default to localhost, if there is no local mysql server, mysql will still run but give you access denied.

Hawkgirl

2:07 pm on Aug 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Uhhhh.

I'm NOT sure. I shall run along and give it a look-see. Thanks!

Hawkgirl

4:11 am on Aug 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have to use 'localhost' or can you give a static IP? Is that a dumb question?

arlo

2:58 pm on Aug 24, 2009 (gmt 0)

10+ Year Member



localhost means that MySQL is installed on the SAME machine as your web server. But giving the static IP of the MySQL server should always work (as long as the IP is correct).

rocknbil

3:53 pm on Aug 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the database host is not specified or is invalid, it will default to localhost. But yes, the mysql server name or IP address should work.