Created
Updated
Viewed
19.7k times

I am trying to set up phpBB on an Apache server that I have installed onto my machine. I have no problems with the server, it's running with PHP and MySQL. I have set up everything including the database thanks to Katana. I just need a little help with an error: Client does not support authentication protocol requested by server that is popping up when it comes to installing the actual BB.

Here is the full error that is displayed:

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 hour's time. Obviously, it's not likely to be sorted by then, but if someone could help me as soon as possible I would be extremely grateful!

  • 0
    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. 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. The same goes for any user you have already created. — Mark Bowker
  • 0
    Wow, hows that for a coincidence. Quick reply too. Not sure what you mean, i will have a look at these links though. Thanks! — Craig C.
  • 0
    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. — Mark Bowker
  • 0
    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 😳 — Craig C.
add a comment
0

9 Replies

  • Votes
  • Oldest
  • Latest
Replied
Updated

The command tool for MySQL is pretty much like a DOS prompt. If you are on Windows, you'll find it under:

Start Menu -> 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. It will look something like this:

MySQL Command Line Interface

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. Make the substitutions for some_user, some_host, and newpwd - be sure to type it exactly as you see it including caps and apostrophes.

Type exit or quit to exit the editor.

  • 0
    OK, I did as you said before and it seems to be working in that it's accepting the SET PASSWORD FOR 'some_user'@'some_host' = OLD PASSWORD('newpwd');. Thank you! — Craig C.
add a comment
0
Replied
Updated

Now there is another problem...

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?

add a comment
0
AX
55 1
Replied

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?

add a comment
0
Replied
Updated

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.

add a comment
0
Replied

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.

add a comment
0
Replied
Updated

btw SB:

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 giving 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.

add a comment
0
AX
55 1
Replied

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.

add a comment
0
Replied

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 🤣

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.

add a comment
0
Replied

As a result of some brilliant help from ATNO and topped with previous help with Axe i have managed to fix this problem by editing the config.php file manually (ATNO was a great help in this).

I cant tell you all how please i am to have got this fixed, i am really grateful for your help.

Look out for some topics in the near future going along the lines of "I have ruined my phpBB forum" 🤣

Thank you!!

add a comment
0