Configuring and Using MySQL from a Windows Computer System
Working With MySQL Database : Configuring And Using MySQL
Configuring and Using MySQL from a Windows Computer System.
The article provides a detailed overview of configuring, connecting, and working with MySQL database from a Windows Operating System. The Windows computer
may be running any Windows OS such as 9x, 2000, or XP. The MySQL database is available free, and offered under GPL. In the example provided, the MySQL hosting server
is running on a separate Redhat 9 (Linux) Operating System.
MySQL is installed during OS install itself. If not installed, you can download latest version of MySQL at the above URL and install the same. The
installation is simple and self explanatory.
Granting permission for a username and password:
Now, you need to setup a Username and Password for accessing MySQL database. For this purpose, you use GRANT statement to set up an account with a
username of demo that can connect from a client system using a password of demo:
GRANT ALL PRIVILEGES ON *.* TO 'demo'@'%' IDENTIFIED BY 'demo' WITH GRANT OPTION;
The GRANT statement grants all privileges to user 'demo' for connecting from client using the password 'demo'. To execute this statement, you should be
either root on server system or another user who has appropriate privileges.
On client system, follow these steps: (Configuration)
Installing MyODBC Driver:
Install MyODBC Driver in the client machine. (How to Install MyODBC)
Configure a MyODBC DSN (Data Source Name) using the following connection parameters:
SERVER or HOST=IP address of server system or Host name
DATABASE=test (The default database or an appropriate one)
The connection string for MyODBC 3.51 using DSN-Oriented connection is as follows :
ConnectionString = "DSN=myodbc1;"
The connection string for MyODBC 3.51 using DSN-Less connection is as follows: