• home
  • forum
  • my
  • kt
  • download
  • Home / 2D Graphics / Flash / Backend /

    Setting up a MySQL database: for Flash designers

    Author: 2007-06-12 08:53:03 From:

    Setting up a MySQL Database: for Flash Designers

    The first thing you need to know is that this is very easy. There's nothing to it and this tutorial is sinfully short. The reason I'm writing this is that I am also in the process of creating a variety of open-source flash utilities (guestbook, counter, shopping cart, image viewer, etc.) that make use of a MySQL database. Rather than include these notes with the instructions for every one of the utilities, I will use this VERY simple tutorial as a reference. Please don't be angry at me if this doesn't cover every aspect of setting up a database. It is intended for Flash designers who need to know just enough to get their DB going so that they can get back to design.

    Furthermore, this tutorial is basically meant for the average designer who's work resides on some host that he/she is paying for. If you are looking to set up MySQL on a server of your own, you need to consult the fellows at MySQL and wrestle the manual. If you are using a free hosting service, they most likely do not support MySQL at all and you need to look into other hosting options.

    Also, this tutorial requires that your host supports PHP and obviously, MySQL.

    Creating the Database

    Before you waste any further mental energy, check the support information from your host to be sure that your account supports MySQL databases. In many cases, you will have to request that a database be set up. Various hosts have different ways of allowing you to do this. Most likely, you have a control panel system that contains a simple database request form. Make the request and remember the name and password of the database.

    That's it! Most hosts set up the requested database within a few minutes but it may take hours. Now, here's where things get interesting.

    Managing Your Database

    I have seen tutorials around that explain how to set up tables using a shell. Although this approach definitely has advantages and is probably 'the right' way to do it, I am going to explain a simpler way for the designer who doesn't intend on working as a system admin at night.

    As a first project for your database, I highly recommend setting up a system called 'phpmyadmin'. It's a web interface for your database(s) that gives you the ability to manage your data directly from the web with a simple, easy to use interface. Follow this link: http://phpmyadmin.sourceforge.net/ and download the latest version. The installation of phpmyadmin is easy and well explained but I will go over it here also. Unzip the files and find 'config.inc.php'. Open this with a text editor (I recomend using www.editplus.com but notepad will do). Use the comments as a guide and set the database name and password according to your database that you just created. Then, ftp all the files to your web site in a directory such as '/phpmyadmin'.

    That's it for phpmyadmin. Go to the directory where it has been installed that contains the 'index.php' file and you should see a variety of options for adding tables and entering queries.

    Final Notes

    Most applications that make use of databases come with a mysql file that sets up the tables for you. Usually these files have a .sql tag. Using such files with phpmyadmin is as easy as copying and pasting the text into the large query box and clicking go.

    You can also use phpmyadmin to manually set up tables, view, add, edit or remove entries.

    SECURITY NOTE: It is very important that you protect the folder where you have installed phpmyadmin. If you don't, anyone who thinks to type that in the URL will have access to your database. Check with your host/control panel about how to password protect a folder.

    Please use this tutorial as a guide and direct appropriate questions to the right places. For example, if phpmyadmin doesn't work, the lads at sourceforge will be happy to help. If you aren't sure whether your host supports MySQL databases, I don't know either. However, I will also try to answer questions posted on the forum at INDIVISION. Good luck and I hope this helps.

    » Level Basic

    Added: : 2002-03-08
    Rating: 4.11 Votes: 95
    Hits: 3567
    » Author
    Bridging the gap between the world of PHP/MySQL and Flash.
    » Download
    Download the files used in this tutorial.
    Download (0 kb)

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      3D (20)
      Math Physics (14)
      3rd Party (5)
      Navigation (60)
      Actionscripting (26)
      Optimization (16)
      Animation (32)
      Projector (9)
      Audio (46)
      Special Effects (112)
      Backend (25)
      Text Effects (65)
      Drawing (18)
      Tips and Techniques (41)
      Dynamic Content (25)
      Tricks (6)
      Games (66)
      Utilities (19)
      Getting Started (71)
      Video (10)
      Interactivity (21)
      Web Design (22)

    New

    Hot