Frames Modems Help Home Page Chipsets Search No Frames
Diary Entries See also Site Info & Diary.
19 August 2001 Now adding the Database MySQL application...
  PHP is hosted within Apache and the latest version of PHP (4.0.6) contains support natively for accessing MySQL.

I'd actually downloaded MySQL on the morning of the 11 Aug, then PHP on the same evening & finally Apache on the 14 Aug, but after reading the documentation it was clear that they needed installing in the reverse order.

The latest Windows MySQL download (11,763 KB) is version 3.23.40 at the time that I downloaded it. In contrast to PHP & Apache there are many binary downloads available for various OSs including win95/98/NT/2000 in addition to the usual source downloads.

The zip file contains an InstallShield package which needs extracting into a suitable directory (I used Windows\Temp). Double-click on the Setup.exe file & you are away. Once again I accepted all default options - one thing to note is that the folder location (C:\mysql) MUST be accepted. No Registry changes are made so no reboot is needed.

After extensive reading I cannot find a way to simply check the installation other than to use the Database (I'll add this when I find it - see below). Interesting points to note are that there are no shortcuts/menu items installed. All programs are reported in the docs I've read as being launched from DOS (good luck winMe users). Also, the mysqld.exe program is provided with debug info compiled into it (intended for error-checking) whilst other programs (mysqld-opt.exe, mysqld-nt.exe) are provided if the non-debug version is used, the different versions for different versions of Windows.

  (written on 19 Sep) OK - how to test the installation:
  1. Apache needs to be launched.
  2. open a DOS window (I did this as a DOS-in-Windows)
  3. change to C:\mysql\bin folder
  4. launch MySQL (type "mysqld" - no quotes)
      This gave an error msg about unable to initialise InnoDB as the data path is not set - this is because I'm not using these type of tables, but did not interfere.
  5. change the default root password as to prevent just anybody connecting to the server:
      mysqladmin -u root password "ANewPassword"
    (include double-quotes) ANewPassword should, of course, be the text of your password to connect to the database server.
  6. tell MySQL to reload it's list of authorized users & passwords:
      mysqladmin -u root reload
    this gave me an error msg about unauthorised access - the password has already taken effect.
  7. test the password:
      mysqladmin -u root -p status
    this prompts for a password, and gives a bunch of facts about the server. Good enough, and successful for myself.

    I drew this routine from an article about Building a Database-driven Web Site Using PHP on the MySQL site. The final item is to shut down the MySQL server:

      mysqladmin -u root -p shutdown
    Curiously, mysqld still shows within the task list. At each command my Firewall asked for permission to allow connection as a server. If denied, the command was unsuccessful. If permitted, the connection was to "localhost" (the machine I'm working on) so no connection was made to the Internet.
I've discovered (much later) that the script mysql_install_db is supposed to be the first thing run before MySQL is used (section 4.16 in the HTML Help file). This script installs MySQL's Grant tables, which assign privileges to the various users, and specifically the root user, with the privilege to do anything. However, nowhere on my Windows system does such a file exist, plus all the Grant tables already exist, so I've either somehow created them or (more likely) they were created as part of the MySQL installation (far more sensible).