Flash Vista - Home
Newest Cool Site
The Two Tales
Site info | Archive
Main Navigation
Home
New Links
Top Rated
Most Popular
Cool Sites
Search

Flash Tutorials
Flash Resources
Flash News
Flash Templates
Flash Intro Templates
Website Templates
Flash Games
Flash Books
FlashVista Polls
Sitemap


Random Link
English
Level Vodka
Site info | Get another
FlashVista
Login
Register
Subscribe

Add Link
Modify Link
Favorites
Suggest Category

Advertise with us
Support us
Credits / Thanks
Contact

Flash Templates:

More Templates ...

Mailing List
User

Password



Register
Forgot password?
Partner websites
iPhone cases and accessories
Free Seo Tools
Free Tutorials
Free Video Tutorials
Best Free Scripts
Wii Fit
Wii Fit News
Other Resources
Suggest
Suggest this site to a friend


Mailing List
Status: Not logged in

English English German French Spanish Italian Portuguese Russian Polish Finnish Dutch Swedish Thai Romanian Traditional Chinese Simplified Chinese
SearchNot logged in
Keyword: Search for: Advanced Search


Setting up a MySQL Database: for Flash Designers


NEW Flash Tutorials in Video Format - Powered by LearnFlash.com: 45 minutes of flash tutorials now available in streaming format or download. Topics Include flash for beginners, text effects, actionscripting, audio/video, flash 8 and more.


Printer version



By Joseph Miller
http://www.indivision.net

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.


(Added: 10-28-2003, Hits: 1, Rating: 2.86, Votes: 28, Reviews: 0)
Add to Favorites Suggest to a Friend

Reviews: (0)


Add Review
Please note:
We review EVERY comment before it appears on the site, so please dont waste your time by posting spam links :)
No URLs allowed, no HTML please.

If you register or login first, your review will contain your nickname


Rate It



Excellent!
Very Good
Good
Fair
Poor