Start earning money with your Website. Matched.co.uk pays 5 english pounds when you sign up and 3 pounds per month for each ad you publish
Find out more at http://www.matched.co.uk
Find more tutorials at
Download MySql 5.0.45 Win32 ,in other words the Windows version from the
MySql website,
First step you'll probably have to unzip the folder,do it in a
location where it's easy to remember:C:\for example.Open the
folder and double click the Set Up file,the installation begins.Choose
typical and click Next.
On the window below click Install
Then, the installation is complete .Check Configure the MySql
server now and click
Finish
Now the configuration wizard starts.Click Next.
On the window below I chose Detailed Configuration to have
access to change the options following.Click Next.
Then, on this window you choose how you going to use MySql todetermine how many resources to allocate for
the server and click Next.
Now choose MultifunctionalDatabase
and.Click Next.
On the window below you can choose the drive where install MySql
or leave the default and Click Next.
Then, on this window you can choose how many connectors
at the same time,when you make your choice,consider how many resources
you have on your machine and click Next.
Now ,if you have a firewall on your computer ,make sure to allow port
number 3306 .At the beginning uncheck Enable Strict Mode to make it
easier for you and then,when you more confident,you can enable it again.
and.Click Next.
On the window below ,leave Standard Character Set
and.Click Next.
Then, on this window choose to run MySql as Windows Service and click Next.
Now enter the root password,this is a very important step,because this
password will allow you to access the database root as administrator and
do basically everything,so make sure to choose a strong password
and.Click Next.
Now you've done and the configuration wizard is ready to execute
the settings you chose just Click Execute .
Now ,you should have a new item in All Programs,to test the database go
to start/all Programs/MySql Server 5.0/MySql CommandLine client as shown
in the figure below.
A command prompt appears, like the figure below, you'll be
asked for a password. Type the password you choose during the
configuration and press enter, if you see something like below,
MySql Server is successfully running on your computer.
When the installation is
finished ,you have to configure PHP to run MySql
with the following steps
To start go to the
PHP directory,in this case C:\ Program Files\PHP and open php.ini with
Notepad .
Find extension_dir =
"./" and change it in extension_dir = "./ext" where ext is the folder
where all the extension are.
Find and uncomment (delete the
;) ;extension=php_mysql.dll and ;extension=php_mysqli.dll or type them in the
case they aren't with the extensions
.
To test if you can connect to MySql using PHP , open Notepad , new
document and copy and paste the following code:
<?php
$host='localhost';
//host name
$username='user';
//database user name
$password='mypassword'; //database password
mysql_connect($host,$username,$password) or die (mysql_error());
echo"connected<br/>";
?>
Then save the file in your website root directory and name it
test_sql.php.Now open the file in your browser and,if everything OK
you should read 'connected ' on a white page ,