Tuesday, January 31, 2006

Connecting to MYSQL via ODBC

Microsoft Access 2000 works great as a general front end and IDE for client or server databases. You can use it to manage not just data, but also the table definitions, stored procedures, indexing, and other DBMS-related functions required of a DBA. Follow these steps to access a MySQL database (for the UNIX crowd) over the Web and manage the tables and data with Access.

Connecting to a database
First, keep in mind that Access 2000 is not a database; it is a tool for managing databases. If you run Access, and don't plan on manipulating or viewing data, you're probably running the wrong application. When you get to the Create/Open option in Access, examine the Open section. You are presented with a list of recently accessed files (even if you have since deleted some of them).

At the top of that list is the option More Files.... If this option is selected, you'll be presented with the common dialog box for browsing the file system. This is where you can select either a local database, or a remote one. A variety of formats are available (e.g., dBase, Access, Excel, Paradox, and csv/text) in this dialog box. If you look at the very bottom of the file types list, you'll see an option for ODBC Databases().Open DataBase Connectivity (ODBC) lets you connect to remote databases.

Connecting to a remote MySQL database
I chose MySQL to connect to a remote database server simply because I have quick-and-easy access to a MySQL server. However, connecting to any other remote database via ODBC and Access 2000 would work very much the same way.

OSI considerations
One of the things to consider, when connecting to remote database servers, has to do with the OSI model. You need to look at OSI because when you're dealing with remote connectivity, you must consider all the routers, gateways, domains, etc. that your connection will pass through; and the security measures implemented by each of them. Almost all firewalls (gateways and routers) allow Web traffic, but not all necessarily allow ODBC traffic.

On the network and data link layers (NIC), you must actually be connected to your service provider. But, on the transport and network layer (protocol), you need to be using the Internet's TCP/IP. On the session and presentation layers (operating system) user/password authentication becomes more of a factor—especially if you're dealing with Microsoft databases. Microsoft databases can make use of a proprietary, OS-level authentication and permissions scheme (e.g., Kerberos, NTLM/NTFS).

Also, on the application layer, the database server software authenticates the user and determines what permissions to grant or block. This is the only security scheme I'm concerned with, because the MySQL server is on the Internet, and it is not a Microsoft product. That means that my ISP has already authenticated me for the connection, and I won't be using NTLM security.

Making the ODBC connection
If you're going to make an ODBC connection to a non-Microsoft database server, you need the ODBC driver for that particular database software. The driver for MySQL is MyODBC. If you haven't already, you'll need to download it, install it, and add the server name and username/password and other properties of the connection to your database server (Figure A).
More info here.

Installing your own DSL Web server

Welcome to DSL/Cable Webserver! Here you will find all the information you need to setup and maintain your own webserver at home or office on your DSL or Cable connection. If you already have DSL or Cable modem, you already have most of the necessary equipment; all you need to do is set it up.

DSL/Cable Webserver is hosted on DSL and you may have visited many other websites that were also run on either DSL or Cable and never knew it! Running your own webserver is easier than you may think and might be a cost effective way for you or your company to establish a web presence.

If you happen to get stuck along the way, our online forums are a great place to ask your questions and get real working answers. If this all sounds good to you, follow along and you'll be running your own webserver from your DSL/Cable connection in no time!

"The Guide" will give you a detailed explanation of what you need to setup your own webserver. If you want to jump right in and start running your own server, then the "Quick Start" is for you. For more in-depth articles on how to configure the different aspects of your website, go to "Step-by-Step" which has tons of screen shots and detailed explanations.

Register here to receive weekly updates about the newest articles and guides from DSL/Cable Webserver!

Read more....Click here

Monday, January 02, 2006

Installing PHP MyAdmin

Intro:
phpMyadmin is a web base GUI interface for MySQL.
You can create database and user even without knowing SQL language.
You can download phpmyadmin from http://www.phpmyadmin.net/home_page/downloads.php

1. Source Download:http://www.phpmyadmin.net/home_page/downloads.php
2. copy config.default.php to config.inc.php
3. Edit config.inc.php
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['PmaAbsoluteUri' ] = 'http://host ip address/pma/';
4. Restart Apache
5. Verify that MySQL and Apache are running and go to http://localhost/pma/index.php

Putting Apache, MYSQL and PHP together

I had been looking around for best possible scenarios of installing apache, mysql and php with the versions compatible for ez publish and dreamweaver mx. This is the compilation I got:

Byteinstead - Installing Apache, MYSQL and PHP

1. Combination compatible for EZ Publish and Dreamweaver MX
http://bytewebdev.blogspot.com/2005/12/ez-publish-content-management-system.html
> Download [ 4.4.1 ] : http://www.php.net/downloads.php
> Download [ 2.0.55 ] : http://httpd.apache.org/download.cgi
> Download [ 4.0.26 ] : http://dev.mysql.com/downloads/mysql/4.0.html

2. Installing Apache
Directory convention: c:\server\apache2
http://www.webmasterstop.com/48-1.html

3. Installing MYSQL
Directory convention used for installation is like the one of mike: c:\server\mysql
http://www.webmasterstop.com/48-2.html
Help on Installation: http://dev.mysql.com/doc/refman/4.1/en/windows-install-wizard.html

4. Installing PHP 4
Directory convention: c:\server\php
http://bytewebdev.blogspot.com/2005/12/configuring-apache-2-and-php-4-for.html

5. Installing PEAR by Hugh William and David Lane
Page 691 Web Database applications with PHP and MYSQL O'Reilly
> 5.1 Edit C:\server\php\go-pear.bat
>>> Change set PHP_BIN=cli\php.exe to set PHP_BIN=php.exe
>>> Save changes

> 5.2 Click on Run in the Start Menu and enter:
>>> C:\server\php\go-pear.bat
>>> Click OK. Press enter to proceed. Enter web procy server or just press enter.

> 5.3 A list of 7 options comes up. Set 1 and 7 to have the appropriate path
>>> For 1 press 1 and press enter. Key-in: C:\server\php\PEAR and press enter
>>> For 7 press 7 and press enter. Key-in: C:\server\php and press enter

> 5.4 Press enter to continue installation. Make sure your are connected to the Internet.

> 5.5 At the end you will be prompted to modify c:\winnt\php.ini
>>> Type Y and press enter this will put the pear path in the include_path of php.ini
>>> Your php.ini should have this line:
>>> include_path = ".;c:\server\php\PEAR\pear"

> 5.6 Modify c:\winnt\php.ini
>>> Set the SMTP = "your mail host"
>>> Set sendmail_from = "yourmail@address.com"

> 5.7 Save the file and exit editor

> 5.8 Restart Apache