can't connect to database
Posted by: John Connor (---.hsd1.co.comcast.net)
Date: April 21, 2015 02:48PM

I'm trying to load my phpBB forum and it won't load the database. I have entered the database password in the My.ini file, I added port 3306 in the config.php file in the phpBB directory and created the database with the same name. I even cleared the directory's cache. See image. [i.imgur.com]

How to I join the database to phpBB?

Options: ReplyQuote
Re: can't connect to database
Posted by: RiggsFolly (---.as43234.net)
Date: April 21, 2015 03:18PM

I suggest you give this a good coat of looking at.

[www.phpbb.com]

and this as well, may be more relevant

[www.phpbb.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't connect to database
Posted by: John Connor (---.hsd1.co.comcast.net)
Date: April 21, 2015 03:44PM

I already have a current phpBB installation on the Internet. What I want to do is use that in wampserver to test things. I already know how to transfer phpBB to a new host as I have did that before. The probelm here seems to be with Mysql. I have uncommented @define('DEBUG', true); in the config.php to operate in the localhost. Now I see the following in Firefox when I load localhost.
[i.imgur.com]



General Error
SQL ERROR [ mysqli ]

Acc�s refus� pour l'utilisateur: ''@'@localhost'. Base 'systechf_arv' [1044]

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 110
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 324
CALL: phpbb\db\driver\mysqli->sql_connect()

FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 337
CALL: phpbb\di\container_builder->get_dbal_connection()

FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 151
CALL: phpbb\di\container_builder->get_installed_extensions()

FILE: [ROOT]/common.php
LINE: 99
CALL: phpbb\di\container_builder->get_container()

FILE: [ROOT]/index.php
LINE: 23
CALL: include('[ROOT]/common.php')



Edited 1 time(s). Last edit at 04/21/2015 03:45PM by John Connor.

Options: ReplyQuote
Re: can't connect to database
Posted by: RiggsFolly (---.as43234.net)
Date: April 21, 2015 04:15PM

Looks to me like somthing wrong with your config

this

''@'@localhost'

Shoudl look like this

'username'@'localhost'

So something possibly in your phpbb config is generating an extra @ symbol

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: can't connect to database
Posted by: John Connor (---.hsd1.co.comcast.net)
Date: April 21, 2015 05:06PM

This is what I have:



<?php
// phpBB 3.1.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '3306';
$dbname = 'systechf_ARV';
$dbuser = 'systechf_ARV';
$dbpasswd = '1234';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
@define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('DEBUG', true);
//@define('DEBUG_CONTAINER', true);

Options: ReplyQuote
Re: can't connect to database
Posted by: Otomatic (Moderator)
Date: April 21, 2015 06:59PM

Hi,

> $dbuser = 'systechf_ARV';
> $dbpasswd = '1234';

Create a user with a password for PhpBB is good!
But we should not forget that MySQL must know this user to accept the connection.
Via PhpMyAdmin User tab, create it.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: can't connect to database
Posted by: John Connor (---.hsd1.co.comcast.net)
Date: April 22, 2015 06:49AM

Yes, I did that in PHPMyadmin already.

I also changed $dbms = 'phpbb\\db\\driver\\mysqli'; from mysqli to mysql.

I edited the my.ini is that what you do? I justr left clicked the wampserver icon and chose mysql/my.ini.

EDIT- IT WORKS!!!

I was previously going to the left in phpMyadmin and clicking new then uploading my database. This time I clicked the user tab and created the database user and imported the database.

Many thanks!



Edited 3 time(s). Last edit at 04/22/2015 07:11AM by John Connor.

Options: ReplyQuote


Sorry, only registered users may post in this forum.