MySQL for Beginners ? How to Create a MySQL Database

Whether you are an experienced web programmer or a complete novice attempting to provide data interactivity with your web site, MyQSL is an easy to use and free database solution that can allow you to store and configure data to be displayed on your web site.

The best way to create and manage a MySQL database is to download an open source (free) program called PhpMyAdmin. PHPMyAdmin allows you to manage all aspects of both your database structure and data from one easy to use interface. This tool is intended to handle the administration of MySQL over the Web.

This tool provides an interface that allows you to create and drop databases, create, drop, or alter tables, delete, edit, or add fields, execute any SQL statement, manage keys on fields, manage privileges, and import and export data into various formats. That sounds like a complicated set of activities, but the easy to use graphical tools make things quite simple and easy to understand. If you make a mistake, the software even provides instructions on where you made your error.

For a complete demo see: http://www.phpmyadmin.net/phpMyAdmin/
For documentation visit: http://www.phpmyadmin.net/home_page/docs.php

Most Linux based web hosting companies provide PhpMyAdmin as a standard feature with their packages. It is also available in a "Windows" IIS version. If your hosting provider does not already have this product installed they will often install it for you, or even allow you to install it yourself. Setup is quick and easy if you follow the step-by-step installation documentation.

Step One: Creating your new database

When you log in to your PhpMyAdmin welcome page, the first step is to enter a name for your new database in a text box provided. You can name your database anything that you wish, however if you are creating the database to use with a script or software package that you purchased somewhere, the script provider will often suggest a "preferred" database name. You should always create your database using the following format:

username_ databasename
Example: myusername_mydatabase

Your complete database name should always begin with your username followed by an underscore, then followed by the database name. This allows the server to know which user is in control of the new database, and it will also provide permission to access the database to only specific users. This also allows different users on the same server to use the same name for their own database, as you did, without interfering with your data ? that is helpful if more than one user on your server bought similar software for their own site. They can then also use the software providers "preferred" database name.

Step Two: Creating a table for your new database

After you have created a database, the next step is to create a table, or even multiple tables, for you to store data. A table is the part of your new database that actually stores data.

You create a table by selecting the database that you created from the drop box list of databases. Once a database is selected a new form appears and asks for you to create a new table.

You must decide what you want to name your table and enter that name into the name box. Try to choose a name that reflects the type of data that will be stored in the table, such as orders, users, or inventory.

You then must decide how many "fields" or columns of data that you want to store for each record. If you need for the table to store five (5) different items, such as username, users email address, users telephone number, users account number, and the users age, than you would need five (5) fields. Simply enter the number 5 in the appropriate box. Once you hit create, the system will create a table and will add those fields into the table for you. Don't worry about the number of fields you might need right now, as you can always add or delete fields later.

Step Three: Defining Fields

Once you have created your table you will be prompted to tell the database what features that you want each field to have. This looks complicated, but it's not if you select your data type from the information below. You basically have to decide between three common data types and select the best choice for storing your data. If you make a mistake you can go back and edit the field.

If the field is to be used to store numbers, here are some choices:

TINYINT ? A very small integer. The signed range is -128 to 127.
SMALLINT - A small integer. The signed range is -32768 to 32767.
MEDIUMINT - A medium-size integer. The signed range is -8388608 to 8388607.
INT - A normal-size integer. The signed range is -2147483648 to 2147483647.
BIGINT ? A very large integer.

Some other less common number options include:

FLOAT- A floating-point number.
DOUBLE ? A double-precision floating-point number.
DECIMAL - A packed exact fixed-point number.

If the field is to be used to store text or both text and numbers combined, here are some choices:

VARCHAR is for varying characters and can be up to 255 characters in length.
TEXT is a column with a maximum length of 65,535 characters ? easy to search.
BLOB is a column with a maximum length of 65,535 characters ? case-sensitive.

If the field is to be used to store dates, here are some choices:

DATE - A date.
DATETIME - date and time combination.
TIMESTAMP - useful for recording the date and time of an INSERT or UPDATE operation.
TIME - A time.

Once you have selected the data type for your fileds you will need to let the system know how many characters that you will need to store in the field.

Example: if you are storing a username, you might want to select VARCHAR as your data type and allow up to 100 characters for that field. If you are creating a User Identification number you might want to select INT and allow up to six characters ? that would allow you to have up to 999,999 users.

The last step to creating your data fields is to select any special attributes that you may find helpful. Some examples are:

Auto Increment: Auto-Increment fields are useful for assigning unique identification numbers for users, products, and customers, etc. By default, fields are incremented using number characters (like "1", "2").

Primary Key: The primary key is a data column that uniquely identifies a specific instance of that data. At least one of your fields must be a Primary Key. Username is an example of a good primary key. You do not want to have more than one individual having the same username.

Index Key: Allows you to speed up searches by designating a field as a preferred data source, especially when combining data from multiple tables.

Congratulations, once you have completed these steps you are ready to import data into your new database.

Don Beavers lives in Bryan/College Station, Texas and is an enterprise level PHP-MySQL programmer at both the Shopping Elf shopping guide and the Datavor shopping guide.

cleaning lady near Morton Grove ...
In The News:

Black Friday deals are already drawing scammers who use fake delivery notices and gift card payment requests to steal your personal financial information.
Apple's iPhone Duo reportedly outlasted the Samsung Galaxy Z Fold 8 by over three hours in battery tests, but its weight and repair costs raise concerns.
Florida Polytechnic University's Jetson ONE eVTOL police vehicle named Astro still awaits FAA authorization before officers can fly operational patrols.
OpenAI's new locked chats feature lets you protect ChatGPT conversations with a PIN, Face ID or Touch ID, but there are key privacy limitations.
A phishing email disguised as an Evite fooled a man even after he emailed his friend to verify it, revealing how compromised Gmail accounts aid scams.
Microsoft's AI diagnostic system identified 83% of complex medical cases in a study, more than doubling the 36% accuracy of generalist doctors.
Account takeover threats go beyond stolen passwords as criminals exploit session cookies, SIM swaps and MFA fatigue to bypass your login security.
SpaceX is reportedly pursuing access to 80,000 cell sites to turn Starlink into a major wireless carrier rivaling Verizon, AT&T and T-Mobile.
Tech advocacy groups warn that foreign nationals at AI companies like OpenAI and Google pose a national security threat amid a lack of federal oversight.
Singapore researchers built the world's first touchscreen woven into clothing, surviving 50 machine washes while displaying images and responding to touch.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
A startup founder woke to $449 in unexpected OpenAI and Anthropic charges after stolen API keys were exploited during the "Black October" cyber wave.
Educational Testing Service hackers stole millions of California student records, but families who moved out of state years ago may also be affected.
Apple's iPhone Duo screens are cracking near the hinge just days after its $1,999 launch, and iFixit's CT scans may reveal what's going wrong.
Travel expert Katy Nastro says 50,000 American Airlines AAdvantage miles vanished from her account after someone redeemed them without permission.
Google AI Overviews can't be permanently turned off, but adding -AI to your searches and using the built-in Web filter can help bypass AI summaries.
Attaxion researchers found 30 fake Texas campaign merchandise stores traced to just two sellers hawking gear for competing Republicans and Democrats.
GM plans to debut eyes-off driving in the Cadillac Escalade IQ by 2028, but safety testing reveals how long distracted drivers take to regain control.
Data brokers assign labels predicting your health, finances and religion based on browsing and purchases, then sell those profiles to businesses.
Elon Musk says he'll give one SpaceX share to every kid in America in 2027, but key details about eligibility and distribution remain unclear.
ClearSpace UK's robotic spacecraft with giant claws will chase down dead satellites at 17,000 mph, with a 2029 launch from Scotland planned.
A fake Social Security statement phishing email uses the SSA logo and a convincing layout, but the sender's domain instantly exposes the scam.
A clean credit report doesn't mean your identity is safe. Six ways criminals can steal from you without triggering a credit monitoring alert.
Carolyn Marvin, a 78-year-old retired professor, was arrested after blocking an Uber Eats delivery robot on a Philadelphia sidewalk for months.
The Midnight Mimosa malware campaign hides inside cheap Android phone firmware, giving attackers powerful access before owners even turn devices on.

How to Build a Basic CSS Layout

Designing without tables by using CSS layouts is fast becoming... Read More

Review of TikiWiki Content Management System

TikiWiki is open source software - it is written in... Read More

Introduction To ISDN, Part II

In the previous ISDN article, we looked at how and... Read More

Microsoft Great Plains Customization Tools ? Overview

Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More

Outlook... Not Just for Email! Using Your Outlook Calendar

Microsoft Outlook is one of the most widely used software... Read More

Great Plains Dexterity Programming ? Overview For Developer

Looks like Microsoft Great Plains becomes more and more popular,... Read More

Microsoft Great Plains Implementation: Verticals - Wholesale Order Entry center ? overview

Microsoft Business Solutions Great Plains has substantial market share and... Read More

Microsoft CRM for Large Corporation ? Security

Microsoft Business Solutions CRM proved to be reliable solution in... Read More

Microsoft RMS Customization ? PO Items Receiving in Great Plains

Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More

The Hidden Power of Online Manual

Writing software manuals is boring, isn't it? We often think:... Read More

Do You Know These Facts About Spyware ?

Imagine something that follows you home and sets itself up... Read More

Microsoft CRM Data Import FAQ

Microsoft CRM has built-in conversion tool, however you should probably... Read More

Computer Phones ? Facts and Fallacies

The stakes are high when considering security, privacy, and savings,... Read More

C++ Function Templates

C++ Function templates are those functions which can handle different... Read More

Microsoft CRM Messaging through Lotus Domino eMail Server - Balanced Solution

Microsoft CRM and IBM Lotus Notes Domino seem to be... Read More

Reloading Windows XP

If you have been running Windows XP for a couple... Read More

Microsoft Great Plains Implementation for Large Corporation ? Overview for VP IT

Microsoft Business Solutions Great Plains was historically designed to serve... Read More

Databases ? How We Love to Hate Them!

You've finally created databases that you can actually use to... Read More

CRM and Customer Life Cycle

Customer Relationship Management or CRM is a combination of enterprise... Read More

Defining OLAP Solutions and Data Warehouse design

This tutorial covers OLAP solutions used by Data warehouses and... Read More

Recent Studies Show that 9 out of 10 PCs Are Infected with Spyware

Spyware and malware are large problems for Internet users today... Read More

Putting Screensavers Under Control

No matter how much you enjoy your favorite screensavers, sometimes... Read More

Anti-Spyware Protection ? Holes in the Shining Armor

Looking at all the ads which promise to get rid... Read More

Microsoft Great Plains Logistics & Warehouse Management ? Implementation & Customization Highlights

Logistics automation is often considered as barcoding extension to Sales... Read More

SSH (SCP) Send Files from Windows to Your Linux Box

Not all of us have the luxury of working both... Read More

personalized cleaning services Glenview ...