Solved

Setting up Mysql to work with Apache

Posted on 2006-11-22
1
178 Views
Last Modified: 2010-03-04
Hey Guys,

Im having trouble installing mysql with my apache installation. I have installed apache 2.2, and php 5 and they are working well, but not the mysql.
I have tried eveything, plz help?
0
Comment
Question by:cjevic
1 Comment
 
LVL 13

Accepted Solution

by:
rhickmott earned 500 total points
ID: 17994421
You dont set up Apache to work with MySQL you configure PHP to do it.

I your Apache Config somewhere you should have a line that says

PHPIniDir

Ideadlly this will be the same as your PHP Installation and you should have a file in there called PHP.INI ( If you dont then thats where your problem lies )

Create a File Caled index.php somewhere in your websapce where you can rin PHP and enter the following code.

<?php
     phpinfo();
?>

Run the script in your browser and search the page for MySQL if you have a section that says "MYSQL" then MySQL is configured and working. If its not then look at the top for where the location of your PHP.INI is to make sure it actually using one and where its location is. Edit the file and find the line that says

extension_dir = ""

Edit this to the path of your PHP folder for example

extension_dir = "c:\php\ext"

Do a search for

;extension=php_mysql.dll

and remove the Semi Colon from the start of it. Restart Apache and *hopefully* your new phpinfo scripe will have a MySQL section in it.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question