473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

apache2+mysql+php4

Hello,
I'm trying to do some database work on an rh9 box. I installed httpd2,
mysq, mysql-server, and php4. I'm having difficulties connecting to a
database via a web page. I'm not sure if i missed something during the
install of the rpms or if i have a problem sql wise, and am hoping someone
can help.
When i installed mysql i ran:
mysql_install_db
then set a password for the root user. I then logged in as the root user and
ran a grant command for a database i'll call example:

GRANT ALL PRIVILEGES ON example.* TO
DataBaseUser@localhost
IDENTIFIED BY 'password';

this returned no errors. Again, from the mysql commandline i can log in as
this user, and use the database. I can query it, and add/delete information
from it. My problem comes when i try to access the database via a web page,
both httpd and mysql are on the same box, and i get an access denied
message. Here's my connect string:

$connection = mysql_connect("localhost","DatabaseUser","password ");
mysql_select_db("example", $connection);

and when i load the page i get the can not connect, access denied.
Suggestions welcome.
Thanks.
Dave.
Jul 19 '05 #1
0 1159

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Aldo Polli | last post by:
Hi, I have this error when I start apache2 with php4 Syntax error on line 233 of /mypath/apache2/conf/httpd.conf: Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic linker:...
1
by: Chris Haynes | last post by:
Hello all, I am attempting to install Apache 2.0.47 and php4.3.3 on slackware8.1. I am pretty new to linux and this is something of a learning experience and so I was anticipating a few problems...
5
by: Ad Astra | last post by:
I am completely new to PHP and am finding installation the most difficult part to understand and implement. Could someone please review the rather long missive below and assist me? I have...
3
by: Armin Irger | last post by:
Hi, i'am running a debian sarge with the delivered apache2 mysql and php4. The file "mitarbeiter_eingabe.php" gets the data over a html <FORM> and send it to...
1
by: Matthew Crouch | last post by:
I *always* have trouble getting LAMP up on a new distribution I'm trying out -- this is the chief reason for a bad case of upgrade-o-phobia that i have. This week it's Debian (Ubuntu). I...
0
by: dave | last post by:
Hello, I'm trying to do some database work on an rh9 box. I installed httpd2, mysq, mysql-server, and php4. I'm having difficulties connecting to a database via a web page. I'm not sure if i...
4
by: Andy Baxter | last post by:
hello, I'm using the php4-mysql module with php4 under debian linux (sarge). I have a script, schedule.php, which runs fine when I invoke it from the command line, but fails with the error: ...
8
by: Daz | last post by:
Hi everyone. I was faced with the choice of whether my problem is indeed a PHP problem or a MySQL. I have decided it's a PHP problem as I don't experience the same problem when I execute the...
1
by: Randell D. | last post by:
Folks, I consider myself well versed with Apache 1.3 and PHP4 - I found drupal and wanted to try it out - I had problems getting it working with Apache2/PHP5/MySQL5 so I downgraded... Note: I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.