Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mySQL and user authetication issue

Status
Not open for further replies.

TSMJ

MIS
Nov 27, 2002
83
Hi everyone!
I'm pretty inexperienced with mySQL but have got it going on a Win2K webserver along with Apache, Perl, CGI and PHP. All I have done to "install" mySQL is run the exe - nothing has been manually entered into any apache or PHP config files as yet. Winmysqladmin works fine and there are no administration problems.

PHPBB is working perfectly with the setup atm, but numerous other scripts like power pphlogger, a PHP/mySQL potd thing and a PHP/mySQL poll will run the .php setup file OK but when you attempt to log in via thier administration pages it either tells you that your password is wrong (when it is definatley right) or just collapses... giving error messages relating to "Login Failed Incorrect Username and/or Password." each time, with the different packages.

Some of them manage to enter tables into the database, others dont. I dont know whether this is relevant but when the setup file of any of the packages asks for a database password I leave it blank because I left the password blank when I was setting up the database for PHPBB. PHPBB can get into its database, why cant the other's get into theirs? Does each database require its own user and pw to be set up for it?

Thanks for your time :)
 
When you instal mysql you need to set the root password. Then you need to understand how the privilege system works and set up some users with passwords and privileges to particular databases as a basic


I suspect (but it is only a guess) that some of the scripts you mention check that you have supplied a password so that they can pass it to MySQL. They like I would not be able to envisage a situation where the password was left blank and you had not set up any additional users because it is such a security no no especially as you are talking about using it as a database behind a web site.
 
I'm now using phpmyadmin to set the privilages (and everything now looks OK for the pphlogger database privilages-wise) but pphlogger will still not let me log in, even straight after setup. Why does PHPBB work seamlessly and pphlogger give me so much grief?

Pphlogger has inserted tables into its db, but will not let me log in via the web interface - it just says that the password or username are wrong. But their not.

There are global and data-base specific privilages for the db... all I have done is edit the 4 lines in the config.inc.php to do with host. user etc. and havnt touched anything else... guh?
 
Heh - I posted a question ages ago and the only reply (AFAIK) was in deutch... so I'm back where I started really. Power pphlogger is really pissing me off now and I've pretty much had enough, but all help is still gratefully accepted!

Thanks hvass - I appreciate your help :)
 
You have got me looking at pphlogger now ...Well its open source so you could poke around under the bonnet.

Step 1: What is the exact error message that it generates can this be tracked down to some php code error message or is it a MySQL error generated message. For example commonly you find code such as

or die ("Error in query: $query. " . mysql_error())

a little bit of programmer generated error message plus the standard mysql_error

What about lines 66-67 in config.inc.php if you suspect these then add your own text to check that this is what is generating the error message

Step 2: Replicate the mysql command that is causing the problem and try it in a standard mysql client

Just a thought as this happens with other applications as well as pphlogger - You may want to check that the physical directories and files that make up the your MySQL database have the right file permissions - MySQL looks after this when it creates the databases and tables but some of the files might have been copied in rather than created by some sort of set up script with pphlogger - sorry cannot help with Windows though ? can you set file permissions on Windows ?

 
I'll try those things when I get a spare moment - thanks!!

The actual message is not a sql one like what you're talking about, it is just a "incorrect password and/or username" jobby you get though trying to log in via the /admin/ dir. Having said that, I hadnt thought to look at any arror logs - off the top of your head do you know how to get at them?

You certainly can set file permissions on Windows - its strange though how PHPBB works fine and even though pphlogger is messed up, it can still create tables in the db.

ttyl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top