-
April 19th, 2005, 05:39 AM
#1
Senior Member
Apache, PHP and mySQL
Hello all,
I'm just going in Apache, PHP and mySQL. For the moment I'm and absolute newbie with this things and I know that the question I'm going to ask is stupid but I don't understand how to get it run.
So here we go.
I have apache installed on c:\apache
My PHP is on c:\PHP
And the mySQL server is on c:\MySql
Everything is well configured(I think) I want to install things like phpBB, nucleus, mambo. I start their installation.php files. They are running and I always get the error "couldn't connect to the database" or "the password for the database is wrong".
I understand what that means but I don't understand how to show the way(the root) to the database? I even don't know in what folder it is. I thought that each program as php... create its own database - that is why I don't understand for what database it is a question?
And about the password I'm also curious I'm sure that I'm writing the right one.
Remember, all I\'m offering is the truth, nothing more.
-
April 19th, 2005, 11:00 AM
#2
I want to install things like phpBB, nucleus, mambo. I start their installation.php files.
You should start by reading the README and/or INSTALL files. They usually tell you what you should do and how to setup mysql.
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 19th, 2005, 09:01 PM
#3
Senior Member
There is so much information in these readmes that I'm confused.
I went in google and tryed to find info for creating database for phpBB.
I found the following web site:
http://www.devside.net/web/server/windows/phpBB
I think it is very well explained. I did what is written there but I got the following things
Warning: mysql_connect(): Access denied for user 'phpBB2user'@'localhost' (using password: YES) in c:\apache\apache\htdocs\db\mysql4.php on line 48
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in c:\apache\apache\htdocs\db\mysql4.php on line 330
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in c:\apache\apache\htdocs\db\mysql4.php on line 331
phpBB : Critical Error
Could not connect to the database
I did everything as it is written? Where is my mistake?
Remember, all I\'m offering is the truth, nothing more.
-
April 19th, 2005, 09:07 PM
#4
I don't know about doing all of this on a windows box, but the error you're getting is that you don't have permissions to do what you're trying to do. I'm going to venture to guess that the operation that is causing this is a connect operation? Does the user phpBB2user exist in mysql? If not you need to add that user and give it access.
-
April 19th, 2005, 09:13 PM
#5
Senior Member
I did the following:
Setup phpBB's MySQL database and user
* Access the MySQL prompt...
o C:\www\mysql\bin> mysql -u root -p
o [note that if password for MySQL user 'root' has not been set; when prompted for the password, leave line blank and hit Enter]
* Create database 'phpBB2' (phpBB's main database, which will hold all tables)...
o mysql> CREATE DATABASE phpBB2;
* Create secured account with user 'phpBB2user' and password 'dbpassword' (secured account -- only accessible from 'localhost', access permitted only to database 'phpBB2', only needed privileges granted)...
o mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP ON phpBB2.* TO 'phpBB2user'@'localhost' IDENTIFIED BY 'dbpassword';
o [note password 'dbpassword' -- substitute in selected alternative]
o [note that DROP is only required for database restores, and ALTER is only required for certain modules and future upgrades]
o mysql> FLUSH PRIVILEGES;
o mysql> quit;
Remember, all I\'m offering is the truth, nothing more.
-
April 19th, 2005, 10:07 PM
#6
Looks like MySQL is setup.. You can check by running mysql -u phpBB2user -p dbpassword.
But:
Warning: mysql_connect(): Access denied for user 'phpBB2user'@'localhost' (using password: YES) in c:\apache\apache\htdocs\db\mysql4.php on line 48
Sounds like the password you set isn't setup correctly in phpBB.
Go to http://localhost/forums/install/install.php and check the password and click on Start Install.
Oh. And I highly recommend changing that username/password to something else
But you need to make sure both mysql and phpbb use the same username/password combination.
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 20th, 2005, 05:35 AM
#7
Senior Member
Don't worry for the password! I will format my hard disk in few days and this is only for testing and the security for the moment is not a question. When I have everything done then I will start thinking for it
I made a new database.
This time I got the same error message. Then I went to http://localhost/forum/contrib/dbinformer.php
Here is what I got:
What you entered
Database Type: MySQL 4.x
Database Server Hostname / DSN: localhost
Your Database Name: test1
Database Username: test1user
Database Password: ********
Connection to database
You have not established a connection to MySQL 4.x.
ERROR:
Your database was found.
Config file
The database has not been successfully connected to so no config file has been generated.
What I'm wondering is: your database was found and then It couldn't establish connection to mySQL4.x
Remember, all I\'m offering is the truth, nothing more.
-
April 20th, 2005, 10:10 AM
#8
Did you do the GRANT for this test1user? Did you GRANT {..} ON test1.* {...}?
Did you FLUSH PRIVILEGES after that?
Oliver's Law:
Experience is something you don't get until just after you need it.
-
April 20th, 2005, 10:13 AM
#9
Senior Member
Yes Sir! I did!
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP ON phpBB2.* TO 'test1user'@'localhost' IDENTIFIED BY '*******';
mysql> FLUSH PRIVILEGES;
mysql> quit;
Remember, all I\'m offering is the truth, nothing more.
-
April 20th, 2005, 10:21 AM
#10
No you didn't
What you entered
Database Type: MySQL 4.x
Database Server Hostname / DSN: localhost
Your Database Name: test1
Database Username: test1user
Database Password: ********
Connection to database
You have not established a connection to MySQL 4.x.
ERROR:
Your database was found.
Config file
The database has not been successfully connected to so no config file has been generated.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP ON phpBB2.* TO 'test1user'@'localhost' IDENTIFIED BY '*******';
Oliver's Law:
Experience is something you don't get until just after you need it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|