home

articles

broadband

browsers

fraud001

javascript001

javascript002

javascript003

links

mysql01

mysql02

mysql03

mysql04

php001

php002

php003

problem001

spyware

virus01

virus02

web_programming

Sponsor001

 

MY SQL

Part 1 - GETTING STARTED - Page 1

MySql is a Database, which is normally used on web sites. The reason it is so popular is because it is free of charge and works very well too. If you want to learn how to use MySql, you will need to install it on your computer.

HELP

Please use the BLOG where you can post a message, or maybe find the answer you are looking for. Please be patient, it took three days before I got the installation working properly. The simple fact is that it is difficult to get everything working properly, and you will need to spend a lot of time, before you get it right. If you are extremely lucky, the following information will help you get it right first time.

WINDOWS

If you are like most people, you have been conned into using Microsoft Windows. As an alternative, there is a Linux operating system, which is free of charge, whereas you would pay about £60 (over $100) for Microsoft Windows. Unfortunately, I am still using Windows 98, because it isn't convenient for me to change just yet. However, I intend to change to the better Linux operating system, as soon as possible.

OPEN SOURCE

The advantage of the Linux operating system is that it is supported by the 'Open Source' development, which supplies first class software, usually free of charge. Just like most other things in life, most people are using over priced software, which is not as good as it is believed to be. Please get wise to this fact.

LAMP

The choice of the experts is Linux, Apache, Mysql, and PHP (LAMP). Now you may be wondering what this has got to do with MySql? Linux is similar to Unix, which is the standard for web servers, although many are now actually using Linux. The most popular web server is Apache. PHP is the best language for exchanging data between web pages and the MySql database. In other words, they all work extremely well together.

WAMP

For those of us who are lumbered with the Windows operating system, we have to find the software, which works with it. Fortunately, those very nice Open Source people have written the software for us, and it is also free of charge. So all you have to do is go and get it.

WEB SITES

DATABASE ONLY

It is very unlikely that anybody would want to use MySql without a web site. But I have a lot of experience of very mysterious ways. So if you only want a database, please ignore the explanations regarding Apache, and PHP.

INSTALLATION

I found this exercise very frustrating. So don't expect to get it right straight away. First of all, you have to find the best combinations of issue numbers. For example, I had Apache 2 installed, which I have been using for PERL CGI scripts. When I tried to make it work with PHP, it didn't. The best advice available was to use Apache 1. Now I have both of them, one works with PERL and the other works with PHP. So the best advice that I can offer is to download the same versions that I am using. Any problems can be posted on the BLOG

WINDOWS 98

I am using Windows 98, so I cannot claim to know about installing the software on other operating systems! I could simply copy the instructions from various books, but there is a lot of information available on the Internet. I had to look through a lot of help pages, various books and Internet forums. My mistake was in the php.ini file; I forgot to change the server back from apache2 to apache.

HIDDEN FILES

After installing all of the files, some of them seemed to be missing. Eventually, I discovered the reason. I had to configure Windows to show 'Hidden Files' and then I could see them. Now I can see lots of files, who says, "Miracles never happen"?

VERSION NUMBERS

My computer is running the Windows 98 operating system and I have installed the following:

    Apache 1.3.20

    PHP 5.0.3

    MySql 4.0.18

APACHE

Because I am using Windows 98, my Apache web server doesn't start automatically. So I start Apache by double clicking on the apache.exe icon. This opens a small window similar to the MSDOS prompt. This displays the fact that Apache is running, and that PHP is also running. To close the program, I click on the close window icon [X].

Click Twice for a picture of the Apache window.

PHP

This program boots up when I start the Apache web server. So I don't have to do anything. However, there are many files, which have to be altered, so that MySql, PHP, and Apache all work together.

MySql

Eventually, I got this program to run properly. Now it starts automatically when I start the computer. However, the program has crashed a few times, so expect to restart the computer now and then, although just recently, everything seems to be behaving correctly.

FOLDERS

The three sets of program files are all located in the following folders:

    C:\apache\

    C:\php\

    C:\mysql\

For example, to find the mysql.exe file, it is located at C:\mysql\bin\mysql.exe

UNZIP APACHE

Click Twice to show the picture. During the installation, you will see a page similar to the one in the picture, make sure that the following are set correctly:

    Server Name = localhost

    Radio button = Run as a service for all users - Recommended

    install in C:\

If you are using an operating system other than Windows 98, you may need to read the help files. When in doubt go to the BLOG.

Please note, this photo is for Apache 2 and you should be installing apache 1.

UNZIP MySql and PHP

These are also located at C:\

OTHER FILES

There are many files to be altered and moved, so please be prepared for some work. Below is a list of these files:

    php.ini

    libmysql.dll

    my.cnf

    httpd.conf

PHP.INI

Locate the file C:\php\php.ini-recommended, copy it to C:\Windows and rename it php.ini

LIBMYSQL.DLL

Locate the file C:\php\libmysql.dll, copy it to C:\Windows\System

This file is hidden, so it will only be seen if you configure windows to view hidden files.

MY.CNF

Locate the file C:\mysql\my-medium.cnf, copy it to C:\ and rename it my.cnf

Continue