asp, active server pages, web design, dll...
November 20, 2008
 

SITE UNDER RE-DEVELOPMENT

 

Please visit our popular ASP function search, and MySQL Database Tutorial.

vzio.com > tutorials > mysql database
Page 1 of 3
MySql Database  
Using MySql Database Server in ASP is pretty simple, but it's hard to come accross a straight forward tutorial on ASP & MySQL. So if you need to setup MySQL to run with ASP this is the tutorial for you.
 
Planet Source Code Contest Winner

This tutorial received 23 excellent ratings from 23 people on planetsourcecode.com the largest public source and tutorial database on the internet.

 
U P D A T E S
  • Last updated: November 14
  • MySQL Front Tutorial Added
  • Changed step layout
  • Added DSN-Less Connection
  • Added Print View
  • PSC contest winner
  • Step 3 - added .ini download option
  • VZIO WEB DESIGN
 
1. Start by downloading the latest version of MySQL at http://www.mysql.com.

MySQL Home

  • The latest versions are listed on the left side of the page almost dead center under Database Server.

MySQL Page 2

  • On the next page you will find different Operating Systems:
    • You can either choose one of the following:
      • Download now > immediate download
      • Choose a mirror closest to you
        • Next is an optional survey or continue to the bottom to choose a mirror
        • Then find the mirror closes to you and start the download!
  • Now download MyODBC which is the driver to connect to mysql from within ASP.
    • From the front page of mysql.com under Connector/ODBC
    • Click on the driver next to "Production:", meaning it can be used in a production environment.
 
2. Extract and run the setup.exe for MySQL & MyODBC
  • Install MySQL to c:\mysql
  • Install MyODBC
 
3. Open Notpad and enter the following information:
  • Save it to Windows Root Directory Usually (C:/WINDOWS)
  • Save it as my.ini
  • Note: If notepad does not keep the exstension, then place quotes around my.ini, this will make notepad keep that exstension. However notepad should keep a .ini exstension.
  • Download it: ZIP INI
  • Enter the follow:
[mysqld]

basedir=c:/mysql
datadir=c:/mysql/data
 
4. Open Windows command prompt.
  • Start > Programs > Accessories > Comand Prompt
  • Type the following:
C:\>cd C:/mysql/bin
C:\mysql/bin>mysqld-nt --install
 
5. The service is now installed. It can be started and stopped with the Windows Service manager, or the NET START/STOP commands.
  • It should tell you that the service has been installed
 
 
6. A nice program to have when using MySQL is MySQL-Front which is a pretty easy to understand program that access your mysql database(s).
 
7. Start up MySQL front.
  • Click New
  • Name the connect whatever you like..
  • Host / IP: Localhost or Your IP
  • Password can be left as root for now..
  • Click connect.
  • Right click root@localhost and click create new database.
  • Name the new database tutorialdb

Create new database, database name goes here....

 
 
 

 

 

 

 
Home - Lessons - Tutorials - ASP tools - Snippets - Search - Advertise - Contact Us