Solved

Setting up Mysql to work with Apache

Posted on 2006-11-22
1
176 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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