Setting up phpBB board using Apache Server {RESOLVED}

  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 8:37 am

Lengthy title, amend if you wish.

Basically, i am trying to create a phpBB on my Apache server i have installed onto my machine. I have no problems with the server, its running with PHP and MySQL. I have set up the database etc etc thanks to Katana. I just need a little help with an error that is popping up when it comes to installing the actual BB.

The error i am having is this...

Quote:
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database.


I am not entirely sure what this means and would love to fix this before i head out to my other work in an hours time. Obviously its not likely to be sorted by then, but if someone could help me as soon as possible i would be extremely grateful!
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 2nd, 2005, 8:37 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 8:41 am

Interesting timing. I just fixed this problem on a new installation on my workstation here not more than a half hour ago.

You need to set mySQL to use Old_Passwords. This describes how and why:

http://webyog.com/faq/23_58_en.html

Official documentation here:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

If you are using root as the user, you will need to reset the password to OLD_PASSWORD using the command line tool that comes with MySQL. Same goes for any user you have already created.
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 8:44 am

Wow, hows that for a coincidence. Quick reply too.

Not sure what you mean, i will have a look at these links though.

Thanks!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 8:47 am

Yeah - the links explain it pretty well. I'm making the assumption you know how to use the command line utility that comes with MySQL. If you don't let us know. I've had to do this with every installation I've done so far, so I have it in my install notes now to remember to do it.
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 8:49 am

I dont know much of anything to do with this unfortunatly.

So, to answer your question. No, i dont know much about the MySQL Command line :oops:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 9:02 am

It's pretty much like a dos prompt. If you are on Windows, you'll find it under start|programs|MySQL |MySQL Command Line Client

When it opens, type in the password for user: root (If you didn't create a password for root the default is blank) then hit enter

At the prompt type the SQL query

SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

You'll need to do this for any user you have already created.

(Making the substitutions for some_user, some_host, and newpwd - be sure to type it exactly as you see it including caps and apostophes.

Type exit or quit to exit the editor
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 3:39 pm

OK, did as you said before ATNO and despite it not working before it seems to be working in that its accepting the "SET PASSWORD FOR 'some_user'@'some_host' = OLD PASSWORD('newpwd');" and its good. Now there is another problem...

Quote:
Warning: mysql_connect(): Access denied for user 'localhost'@'localhost' (using password: YES) in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Does anyone know what the problem is?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: 07 Jan 2004
  • Posts: 5783
  • Loc: Sub-level 28
  • Status: Offline

Post December 2nd, 2005, 3:45 pm

You need to give your username the appropriate rights to the database you wish to connect to.

It looks like you're using "localhost" as the username?
John
» PHP Scripts & Resources » Free Photoshop Tutorials
» Anybody wanna pay my mortgage? PM me!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 3:51 pm

I believe AXE has it exactly correct. SB, if you haven't already done so, download and install this administration utility. It will make your life easier
http://www.mysql.com/products/tools/administrator/
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 3:51 pm

yes, thats correct. Not quite sure what you mean by giving it the correct rights. I was sure it was all ok.

I am new at the Apache, PHP, and MySQL (AMP) scene, so you will have to excuse how stupid i may sound.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 3:57 pm

btw SB:

Quote:
Access denied for user 'localhost'@'localhost'


You most likely don't have a user named localhost.

I'm thinking in your config.php you have 'localhost' as your user, when it most likely is 'root'

If that's the case, I would recommend creating a new user other than root and give them access permissions to the database. That Admin utility will help you do that easily.

Using root to access a database via phpBB is a security risk.
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: 07 Jan 2004
  • Posts: 5783
  • Loc: Sub-level 28
  • Status: Offline

Post December 2nd, 2005, 4:03 pm

Yup, go ahead and setup phpMyAdmin with the "root" account, and .htaccess protect its location so that it's not accesible via the net.

Once you've got phpMyAdmin setup (if you don't already), you can create new databases, new users (with password), and setup the appropriate access rights through that.

Basically, each user you create, you have to tell MySQL exactly which databases it has access to, and what level of access (add data, remove data, read-only access, etc) they're allowed to those databases.

This is basically due to the fact that it's designed for a multi-user environment, and on shared hosting, you don't want somebody else's username accessing your databases and playing with your data.

If your server is disconnected from the net, then you can safely use the "root" login for your scripts, as nobody else will be able to hit your server anyways.
John
» PHP Scripts & Resources » Free Photoshop Tutorials
» Anybody wanna pay my mortgage? PM me!
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 4:13 pm

my server will be disconnected from the internet anyway as i hardly use my laptop for internet. Only if i need to download files.

Heh, i am even leaving this post on another laptop i use most of the time despite my personal laptop being inches away :lol:

Thank you for your help. I will download this Administrator file and see what happens. Looks quite simple to use.

Needless to say, i will probably leave some post here in the future with some stupid question again.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: 28 May 2003
  • Posts: 20122
  • Loc: Pittsburgh PA
  • Status: Offline

Post December 2nd, 2005, 4:24 pm

P.S. SB -- I like you're new rank *lol
(*watches SB as he goes to run and hide under his bed *lol)
Boasting Rights Sports Forums and Pools. NFL Preseason pool is available now! Sign up and play for free!
Nuclear Services - www.alaron-nuclear.com
  • SB
  • a.k.a Pinky
  • Genius
  • User avatar
  • Joined: 16 Nov 2004
  • Posts: 6009
  • Loc: Edinburgh, Scotland
  • Status: Online

Post December 2nd, 2005, 4:27 pm

ATNO/TW wrote:
P.S. SB -- I like you're new rank *lol
(*watches SB as he goes to run and hide under his bed *lol)


ATNO, you are not the first person that has said that since that rank was put in place. I will repeat what i said then, i aint no coward :)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 2nd, 2005, 4:27 pm

Post Information

  • Total Posts in this topic: 19 posts
  • Moderator: Moderator Team
  • Users browsing this forum: No registered users and 90 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2008. Driven by phpBB © 2001-2008 phpBB Group.

 
 
 

Need a pre-made web design for your website?

Check out our templates here: Ozzu Templates

Perfect Money : Swiss approach to work with e-finance