Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Any One Know How To Create A Database?
sPyfReEsTyLe
post Aug 28 2005, 07:24 PM
Post #1


Member [ Level 1 ]
Group Icon

Group: Banned
Posts: 32
Joined: 28-August 05
Member No.: 8,155



Hi i would like to create a database but i do not know how. Could some one please show me how.
Go to the top of the page
 
+Quote Post
Houdini
post Aug 28 2005, 09:17 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



Well lets do this a couple of ways:
ONE With a script like the below PHP script:
CODE
<?php
//quick database create database code without forum entry
//define the variables for connection to database.
$database="testdb"; //give it some kind of name here (the database)
$user="username"; //you need a user name to use the database server
$host="localhost";  //usually localhost
$password="yourpassword";  //you will need a password for the database
$connection=mysql_connect($host,$user,$password)
  or die("Couldn't connect to server, check your username and password!");
mysql_query("CREATE DATABASE $database")
  or die("Couldn't execute query");          
echo "Database $database has just been created for you!";                    
?>

If you copy the above code even with the comments and assign the proper values for the host, databasename, username, and password it will connect to the database and create a database named testdb. Now let try method

TWO


Go to the cPanel like below

user posted image

Then after you click the MySQL Icon you will see this:

user posted image

So there you go how to create a data base with or without a cPanel using script and without using a script by using the cPanel, the choice is yours.
Go to the top of the page
 
+Quote Post
mapuana
post Aug 29 2005, 10:24 AM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 4
Joined: 13-July 05
Member No.: 7,076



QUOTE(sPyfReEsTyLe @ Aug 28 2005, 02:24 PM)
Hi i would like to create a database but i do not know how. Could some one please show me how.
*


Very nice script...I say the same thing...

MySql is a free and very easy to use, easy to understand web-based database. The latest version is very user friendly, and you can even export your data as excel, edit it, and reinsert it into the database very easily, if you are more comfortable using that format. It is very well documented and I believe it has a support forum community as well. However, you'd need to know how to code it, write queries.

My overall suggestion to you is this. Search tHotscripts.com, sourceforge.net, etc. for a free script that does what you need your database to do (like drive an address book, website, customer database, blah blah). Basically, search for a PHP script and download it. And if you can spend a few bucks (between 20USD and up), you can find commercial scripts which tend to be much better written, efficient and visually appealing. This will give you a front-end to display your data and work with the database, possibly even an admin side so that even the most inexperienced computer user can use the software.
Go to the top of the page
 
+Quote Post
eit
post Sep 16 2005, 12:10 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 2
Joined: 16-September 05
Member No.: 8,500



how about adding attributes into the database? What script can I use?
Go to the top of the page
 
+Quote Post
macace8
post Sep 18 2005, 01:02 AM
Post #5


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 31
Joined: 18-September 05
Member No.: 8,536



like what kind of atributes? if you want to add a table (where you store info) do this:

CODE

$query="
CREATE TABLE  `[table name]` (
`[column name]` [data type] ,
);
";
mysql_query($query);


for instance:

CODE

$query="
CREATE TABLE  `contacts` (
`name` VARCHAR( 20 )
`phone number` VARCHAR( 20 )
);
";
mysql_query($query);
Go to the top of the page
 
+Quote Post
Houdini
post Nov 13 2005, 09:42 PM
Post #6


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



Your database is mostly an area where you are going to store cata that will change over time and need frequent updates or even new data altogether, but in order for it to be of any value it must have as little a one table that contains some sort of structure.

Take for example you want a database that holds all your household items with serial numer if they have such , a description of the itms, other attributes of the item such as cose, or its appraised value and so on and this database has all this stuff so in the event that you have a disaster or theft you can bring up the information and let the insurance company and police (if it were a theft or robbery.

You would need a table that had such fields as item, color, description, phptograph if any, serial number if any, cost or value, and so on. So you have tables for each of these and the data type needs to be defined within the table.

So you name a database lets say mystuff (use the SQL query CREATE DATABASE 'mystuff' ), then it would have a table which you use to store your stuff kinda like:


CREATE TABLE 'inventory' (
'itemNumber' INT (4) AUTO_INCREMENT,
'item' VARCHAR (40) NOT NULL,
'value' VARCHAR (15),
'color' VARCHAR (10) ,
'description' VARCHAR (255),
'serialnumber' VARCHAR(50),
'date_aquired' DATE,
PRIMARY KEY (itemNumber))

of course this is just a made up example but I thinkyou should be able to get the idea, your real database might have hundreds of tables, but you need to figure out what all you want in a database and then set them all up, you might want to try a search for MySQL tutorials or SQL tutorials and learn a little about just what you want a database to do for your circumstances.
Go to the top of the page
 
+Quote Post
lecius
post Nov 15 2005, 12:21 AM
Post #7


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 16
Joined: 15-November 05
Member No.: 9,625



To make a database you need a ftp. After you have a ftp please look for the install. Open the install and fill in the required info. After you do that start the database and see if it is working. If it is not working then please post for further help. This works for appace and if you need help with something else PLEASE tell me right away I am really good with this. blink.gif
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Nov 15 2005, 07:57 PM
Post #8


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411



QUOTE(lecius @ Nov 15 2005, 07:21 AM)
To make a database you need a ftp. After you have a ftp please look for the install. Open the install and fill in the required info. After you do that start the database and see if it is working. If it is not working then please post for further help. This works for appace and if you need help with something else PLEASE tell me right away I am really good with this. blink.gif
*




That's not true - FTP doesn't have anything to do with the database, unless you're uploading the actual mysql binaries to your account for upgrades. To create a database, phpMyAdmin is sufficient, or if you're a power user - you have to use the command-line client of MySQL from your shell. Once again, whether it's apache or some other httpd, I've never heard of FTP being used to create databases... That's certainly a first. Try not to spread around disinformation like this.
Go to the top of the page
 
+Quote Post
vizskywalker
post Nov 16 2005, 02:44 AM
Post #9


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



i've noticed that at least for me, phpmyadmin cannot create new databases, I have to use the other MYSQL script in cpanel. However, if I made a database and dropped it, phpmyadmin can recreate it. Dunno why, or if this is an issue for anyone, but it's slightly annoying to me.

~Viz
Go to the top of the page
 
+Quote Post
JUDGE_RELIC
post Jan 2 2006, 04:04 AM
Post #10


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 44
Joined: 2-January 06
Member No.: 10,423



I thought I could add something positive here, but you guys got me beat, hands down!
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Creating A Game In Rpg Maker 2000/2003(18)
  2. How To: Create PDF With Php(18)
  3. Create Your Own Shout Box(13)
  4. How Do I Create A Good Fire Animation Using Flash ?(13)
  5. How To: Connect, Read, Write, Close A Database(4)
  6. Help Needed To Create Login Script With Perl/cgi(21)
  7. Need Help With A PHP - MySQL Registration Script(13)
  8. You Cannot Create A File Named Con(9)
  9. Help Me Create A Text-based, Turn-based Game(10)
  10. MySQL Output Database Question(18)
  11. The Cloning Issue(43)
  12. Can You Create A Folder Name "con"(18)
  13. How Do I Create Static Routes In Windows Xp?(11)
  14. How To Create Your Own Proxy Site (free And Easy)(13)
  15. How To Create A "user Profile" Page.(14)
  1. How Do You Create A Vista?(21)
  2. Accessing Ms Access Database From A Centralized Location?(5)
  3. Mysql Database Management(1)
  4. Mysql Database Entry By Excel Sheets(2)
  5. Space Needed For Database(10)
  6. Database Access On Remote Server W/jsp(0)
  7. Create An Animation With Powerpoint(1)
  8. Create An Ftp Server On Your Pc With Serv-u(1)
  9. Some Useful Database Links.(7)
  10. What You Need Before You Can Create A Text-based Game..(7)
  11. Database(7)
  12. Best Database(7)
  13. How To Understand A Database Schema(4)


 



- Lo-Fi Version Time is now: 7th October 2008 - 02:53 AM