MySQL server (Lotus Foundations)
From Nitix Knowledgebase
| "MySQL server (Lotus Foundations)" is included in Lotus Foundations Users Guide. |
Contents
What is the MySQL Server?
MySQL is an advanced database administration tool that can be used to store dynamic Web page data for services such as on-line catalogs and stores, create accounting databases, and create address books. MySQL is an advanced feature for users that are familiar with databases and SQL (Structured Query Language). For more information, go to http://www.mysql.com.
If the MySQL server is enabled, users on the internal network can access personal databases and the databases of any teams to which they belong. User and team databases are automatically created when user and team accounts are set up.
Setting up Windows for MySQL Access
You can use Microsoft Access to access and manage database tables.
- You first have to download MySQL ODBC (Open Database Connectivity). Go to http://www.mysql.com/downloads/api-myodbc.html.
- On the screen that is displayed, click the link for the most recent stable release. Always download the most recent stable release. For this example, we downloaded MyODBC 2.50.
- From the Windows downloads section of the screen that displays, click the download link for Windows" or "Windows x64".
- On the screen that is displayed, select the nearest server to download from.
- In the window that is displayed, select the download location where you want to save MyODBC. This set of steps assumes that it is saved to the desktop.
- Double-click the icon on your desktop. Extract the zip file to a directory called myodbc.
- Double-click on the myodbc folder that you created in the previous step. Double-click Setup.exe.
- The Microsoft ODBC Setup screen is displayed. Click Continue.
- Select MySQL from the Available ODBC Drivers list. Click OK.
- From the Windows Start menu, select Settings > Control Panel > ODBC Data Source. The ODBC Data Source Administrator screen is displayed.
- Click Add.... The Create New Data Source screen is displayed.
- Select MySQL from the list. Click Finish.
- Provide the following information:
- a Windows DSN Name (such as MySQL Address Book)
- your Lotus Foundations server’s host name or IP address
- your MySQL database name, user name, and password.
- Click OK on this screen and then on the ODBC Data Source Administrator screen.
- Open Microsoft Access.
- Create a database named address book.
- Anywhere in this window, right-click your mouse. Select Link Tables.
- In the Files of Type section of the screen that is displayed, select ODBC Databases. The Select Data Source screen is displayed.
- Select the Machine Data Source tab and select MySQL Address Book. The Link Tables screen is displayed.
- Select the appropriate table and click OK.
- Make sure that the appropriate table is highlighted and click OK. The table opens in Microsoft Access.
What is a dynamic Web site?
Dynamic Web sites, such as online stores or catalogs, use databases to store information and PHP or Perl scripts to produce the Web page based on the data stored in the database. This enables the changing information to be reflected on the site as it changes. Dynamic Web sites require advanced knowledge of PHP or Perl script, and it is advisable that you seek the help of a qualified programmer to create your own.
Generating dynamic Web sites
The following PHP script is used to render the example address book into a dynamic Web site.
- Enter the following script into a text file and save it as addressbook.php:
- In the Windows Network Neighborhood, copy the script in John’s WWW folder (on the local server).
- Open an Web browser on your workstation. In the address bar of the browser, enter:
- The address book opens in the browser.
<?php
mysql_connect("localhost", "john", "password");
mysql_select_db("john");
$result = mysql_query("SELECT * FROM AddressBook");
while ($line = mysql_fetch_array($result))
list ($name[],$phone[]) = $line;
for ($i = 0; $i < sizeof($name); $i++)
echo "<tr><td>$name[$i]</td><td>$phone[$i]</td></tr>\n";
?>
http://SERVER_NAME/~john/addressbook.php

