473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1098

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...
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.