The History of Laurel Wreath




• • •

C r e a t i n g   a    M y S Q L   d a t a b a s e

Tutorials: • Webmasters tipsMeta TagsCSSChoosing the right Hosting
HTML colors Palette • MySQL database •



This is a very quick guide for those who start working with SQL and are getting lost inside the rather confusing jungles of this programming language. Let's begin with finding out what for do we need a MySQL database in the first place. Every time you wish to set a dynamic script (mostly php) you will need a MySQL database. This includes Forums, Blogs, Polls, Guestbook, eCommerce carts, Joomla, Mambo, php-Nuke, TYPO3, Xoops, osTickets, Zen Charts, Account Lab (billing system), Mailing list, newsletters, phpWiki, and other dynamic scripts that can handle your site with its visitors and requests, even when you sleep. Every hosting plan provides you with a particular number of MySQL databases, but note that every script requires a separate database, i.e. if you wish to create your own forum, guestbook, poll and blog -- you need at least 4 free databases, and every script requires its minimum free web space available.

The easy way is to install the scripts using "Fantastico" extension. If you see the blue smileys face in your cPanel -- that is a good sign, because you will save yourself a lot of headache. All you have to do is click the Fantastico button, and choose one of the pre-installed scripts. The extension will automatically create a folder for you (which you will only be asked to give a name to), user and password. SQL database shall always be password protected, and when you set it, do not make the same password/username as your hosting account's login details. Fantastico will do the rest of the work for you.

The hard way is setting the database manually. It's not really difficult, but if you never did it before you are likely to break your neck, or, worst of all -- mess something in your website. Here is what you should do, step by step, in order to create a fully functioning SQL database:
• Login to your cPanel, and click on "MySQL databases", you will be led to a page that says "MySQL Account Maintenance".
• Create a name for a new database, in the "Db" field, and click "Add Db" (Db = database).
• You will get a message says "Database created". (but that's not all!)
• Click on "Go back", because now you must set a password for your database. Your database's username will be created automatically based on account name (i.e. the username you logged in with to the cPanel). But since we want our database to be secure, we are going to create a new user. After you clicked "go back", and saw the name of the database created, scroll a bit down to the "User" section, and make a new username and password (as said above already, it should be different from the cPanel login details). The password should be between 6 and 8 characters, numbers or letters only and must not contain the username!

Top

• When you filled user name and password, click "Add user". You will receive a message says Account created....And here comes the most common mistake -- you might think that you are done, but it's not all. If you stop here, your script will keep giving an error "User / database not found" and you wouldn't know why.
•Click "Go back" again. Now you need to grant user access to the database which you have just made.

• If you have a several databases already, make sure that the most recent one (the one you work with now) is set in the drop down menu (both user's name and database should match in one line), and click "Add user to Db" (right next to the drop down menu's. You will receive a message "Account added to the database".
• Go back again. If you see "Connection Strings" for both Perl and PHP (should be something like... $dbh = DBI->connect("DBI:mysql:username etc etc... ) then congratulations! You have set the database successfully. Now you can copy and paste these strings to the files, which should connect to the database ( configuration / connection file to the MySQLl within the script), let's say your blog or newsletters script.

If your script has an installer included, then (after uploading all the files to your server) set CHMOD permissions to 777 (in FTP select the setup file, click "properties" and check all the boxes, this will give you a total of 777 permissions).
• Open configuration file of the script and change their default values with the "Connection Strings" line from your database account.
Now, every script is different and has a different installer. in some cases, you would need to upload the modified "config" file, replace the old one and run the installer again with the ready database details.

Top

Where to get scripts, if you have no Fantastico? Here are a few most popular and widely used scripts, which you can install manually.They are all free, legal and been tested by millions of users before you.

WordPress blog - Personal publishing tool, can be easily customized.
PMachine blog - Feature-rich web publishing system.
Image Gallery - Open source web-based photo album organizer.
Joomla - Open Source Content Management System, very easy to use.
Mombo Open Source - CMS featuring inline WYSIWYG editors, newsfeeds, syndicated news, links manager, statistics, content archiving, date based content
PHP-Nuke - Popular community-based portals with a big choice of modules and languages.
TYPO3 - Open Source content management system for enterprise purposes on the web and in intranets (Note: disk space required: 42 MB).
Xoops - Popular advanced portal system, Object Oriented.
WebCalendar - Powerful webcalendar featuring private and public calendars.
Advanced Poll - A highly windows-inspired poll script
PHP Support Tickets - One-admin Support Tickets system featuring self-registering, emailing to admin, attachments.
phpBB Forum - Open-source bulletin-board package, with simple user interface and admin panel, can be customized in any way.
SMF Forum - Community software package, jam-packed with features, with a minimal impact on resources.
eCommerce Cube Cart - Easy to use shopping cart featuring unlimited categories and products, multiple payment gateways and downloadable products.
eCommerce Zen Cart - User-friendly, open source shopping cart system
4Images Gallery - Image gallery system featuring unlimited categories, web-based and FTP upload, auto-thumbnails, comments, rate a picture and more.
PhpWiki - Edit the pages through an HTML form. Linking is done automatically on the server side.
PHP Form Generator - A form generator featuring up to 100 form fields, input fields incl. file upload, customizable fields attributes, send submitted data to an email address or store them in a database.

        Tutorial written by Liza Kliko.

• • •


BackTopNext