Modified 2001/05/17 - JSB
mySQL Installation and Usage
I. Installing mySQL into Windows Server 2000
- The first thing to do is to download the latest stable version of the mySQL Database Server software from the mySQL foundation at http://mySQL.com. (I used the Windows version 3.23.28, which downloads into a ZIP file called, mysql-3.23.28-win.zip.)
- Next you will need to extract (unZIP) the downloaded file into a temporary area and run the included Setup.exe file to install it.
NOTE: If you are on NT and install MySQL in any other folder than C:\MYSQL and you intend to start MySQL as a service, you must or edit a file named C:\MY.INI (the MY.INI file will default to C:\WINNT directory) with the following information:
[mysqld]
basedir=E:/your-installation-path
- In the C:\mysql\bin directory (or wherever your "basedir" is installed) run the winmysqladmin.exe program bring up the DB server for the first time. This program will try to find the MY.INI file, querying for a username and password, into which it will want to append this username and password info (I used user "admin" and password "admin"):
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=admin
password=admin
- The winmysqladmin.exe program will usually insert itself into the system tray (small icons on the far right of the start bar) and load there in the background upon subsequent rebooting. (Clicking on this same icon and selecting the "Show me" option open this application to the desktop. Clicking on the "Hide me" button will place the winmysqladmin application back into the system tray as a traffic light icon.)
- Clicking on the "Databases" tab in the winmysqladmin application will show a particular database called "mysql" which contains info about the host, users, passwords and priviliges. As a superuser or administrator you will need to have full priviliges. To enable these priviliges ou must now run the MySqlManager.exe, which also resides in the C:\mysql\bin directory.
- The MySqlManager.exe application will open with a database project window, probably with the name MySqL1, containing two folders, Test and MySQL. Click on the MySQL folder and highlight the subdirectory named mysql. Then go to the Tools dropdown menu and click on SQL Query. In the query space enter the following SQL statement (admin is the username I have selected):
GRANT ALL PRIVILIGES ON *.* TO admin@localhost;
Back to top of page.
II. Creating and Accessing the ODBC mySQL Db Connection Object from VBScript
The following is a working VBSript sample of code I used to create the mySQL connection object:
<%@ LANGUAGE = VBScript %>
<%
' Open/Create mySQL DB to get Access2000 data - these live at mysql\data\2000toMYSQL
Set OBJmysqlDbConnection = Server.CreateObject("ADODB.Connection")
OBJmysqlDbConnection.Open("Driver={mySQL}; Server=localhost; DATABASE=2000toMYSQL; UID=admin; PWD=admin;")
SQLQuery = "CREATE TABLE MASS_COUNTIES (COUNTY_ID INTEGER NOT NULL , COUNTY_NAME CHARACTER(30) NOT NULL ) ;"
connectionStatus = OBJmysqlDbConnection.Execute(SQLQuery)
%>
Back to top of page.