Welcome Guest ( Log In | Register )



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Any One Know How To Create A Database?
nightfox
post Jan 3 2006, 10:53 PM
Post #11


NiGHTFoX - Hiding in the dark
Group Icon

Group: Members
Posts: 680
Joined: 3-April 05
Member No.: 3,584



QUOTE(vizskywalker @ Nov 15 2005, 10:44 PM)
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
*


I think since phpMyAdmin is a cPanel plugin (I know you can get it stand-alone, I have a copy of it), the folks at cPanel disable making of a database through phpMyAdmin for some reason and make you create one through cPanel.

It's the same way on my paid host. You have to create databases and users in cPanel, but you can do everything else right in phpMyAdmin.

[N]F
Go to the top of the page
 
+Quote Post
Houdini
post Jan 4 2006, 05:36 AM
Post #12


Super Member
Group Icon

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



I thought the FTP method of creating a database was rather unique, I would like to see that happen it is far beyond my level of just using MySQL or PHP script. I have only been able to use it for uploading files to the server but when I learn how to use the FTP method I will have gone to the extrmes with coding.

Go to the top of the page
 
+Quote Post
valcarni
post Mar 2 2006, 04:34 PM
Post #13


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 22
Joined: 2-March 06
Member No.: 11,675



i use the easy way of cpanel ? or doesn't this host offer cpanel for mysql setup ??
cause i wish to run a games arcade forum with high scores (one of the most comprehensive on the net) tongue.gif
so i really hope it's not that hard.. cause i did have luck on another host.. but they didn't like my .htaccess file which was really annoying.

and phpadmin is for just using your mysql database AFTER you have created your database... like i know that much tongue.gif
Go to the top of the page
 
+Quote Post
virtuous8
post Mar 16 2006, 04:23 AM
Post #14


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 10
Joined: 13-March 06
Member No.: 11,941



A database consists of tables.
To create tables you should begin with data analysis, or relational model analysis.
This analysis is very useful when you want decompose the data into appropriate tables.
Begins with relational diagram, identiy is-a , has-a, and other relationships between objects.
For example: a department has one or more employees, a department has at most one manager.
is-a relationship is like subclassing in programming term.
After you have constructed the diagram, you then begin decompose it into tables using standard rules.
example: when A involved in many-to-one relationship C with B , then you create 2 tables for A separately, and a table for the relation C separately, B is now absorbed in the relation C, all the attributes,keys of B are combined with C.
example to create a table:
create table C(attribute1 datatype1, attribute2 datatype2,...)

A many-to-one relation to C when some element of A is mapped to the same one element of C, and each element in A is mapped to exactly one element in C.



Go to the top of the page
 
+Quote Post
Samya
post Mar 20 2006, 06:51 PM
Post #15


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 35
Joined: 20-March 06
From: Karachi
Member No.: 12,138



Ohhhh, very simple ...

First of all u need to specify the Database type ...
R u talking about MySQL, PostGRE, Access or what ???

Anywayz, I am assuming that u are asking for MySQL :
There are many possible solutions for this :



First Solution : SQL Query through PHPmyAdmin

Just go to PHPmyAdmin and u can create a new Database either my using the GUI Interface or u can insert the MySQL query ..
If u want to insert the DQL Query than, I am assuming that u want to make a database named samya.
Than here is ur Query :

QUOTE
CREATE DATABASE `samya` ;


Thats it ... u are done ....

Limitations :
Keep one thing in mind that, if u want to use this method than u must have the given ALL PRIVELEGES to the user otherwise, u might get an error e.g. NO Priveleges

Second Solution : Using PHP

This is more or less similar to First method ...
Use this Code :

QUOTE
mysql_create_db('samya');


Keep one thing in mind that before calling for this function, u must have already connected with the Database ...

U can can connect with the database using this function :

QUOTE

<?php
$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
?>


Place ur Databse username and Password into $dbuser and $dbpass

The value $dbhost is ur Host.
In more than 85% cases it is either :
  • localhost
  • 127.0.0.1

However u may have a different value. Contact ur Hosting Provider for this purpose ..
If u know the MySQL server name and port number than u can insert this into $dbhost.
For example if the
MySQL server name is db2.mydomain.com and the
Port number is 3306 (it is also the default port number for MySQL)
then you you can modify the above code to :

QUOTE
$dbhost = 'db2.mydomain.com:3306';


However, this method also has the same limitation ......
i.e. u must have given the relevant Priveleges to the user ...

Third Solution : Through Administration

Still, there are a number of WebHosts who donot allow the creation of Database through phpmyadmin or through any PHP Script ...
This is aminly due to safety purposes ....

One of these examples in cPanel. In case of cPanel u need to create the database and add its users all in cPanel .....

For this, just open, ur cPanel, and than click : MySQL Databases.
After that, add a Database name, and Click Add New Database
That's it smile.gif ....

Now u need to add a user to the Database ....
Just select a user from the Drop Down Button and click Add User to Database, or otherwise Create a new user and add it to Database .....

I dont think that u will face any problems now ...
If u still face any problem, than u can Post further in this topic ...

*** All Appreciations and Criticisms about this tutorial are welcome ***

Regards:
Samya Khalid
Go to the top of the page
 
+Quote Post
cherri
post Apr 21 2006, 08:23 AM
Post #16


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 45
Joined: 21-April 06
Member No.: 12,892



I need to make a database too... can someone please make one for me,

and mail it to p.meiring@iinet.net.au

name: data
password: Geografix_43
Go to the top of the page
 
+Quote Post
Houdini
post Apr 21 2006, 09:36 AM
Post #17


Super Member
Group Icon

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



Sorry you will have to create the database your self there is no way to email a database to some one, the database lives on a Relational Database Management System like MySQL or Postgre or mssql and more. You need to have acces to that server and the privlidges to use said server. If you have a database server and the proper privlidges then maybe some one can aid you in doing it. First you need to know how you are going to sturucture the database and all but as far as creating a database the query is quite simple it is basically
QUOTE
CREATE DATABASE databaseName
where the italisized databaseName is what you want to call the database. Just having the newly created database though is not very useful because well...it has no data, the data is stored into tables within the database so that is where planning and organization of your database come into play.

You need to be more specific and detailed in your question about creating a database. What kind of information are you going to be storing, how you plan to use this information. Do you want to store inventory information, or employee data, or medical data are some of the thing that need to be known before you just start building a database and the tables and data types required to have a functional RDBMS.
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. phpBB Database Transfer(10)
  2. Embedded Database(7)
  3. Need Advice On Creating Online Music Database(6)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. The Best Database(48)
  6. Database Program With GUI(14)
  7. MySQL Output Database Question(18)
  8. What Is Maximum Capacity Of Astahost MySQL Database?(11)
  9. Is It A Good Practice To Store Image Or Other Binary Files Directly In A Mysql Database(4)
  10. Permission Problem With Mysql Database Creation(8)
  11. Need Info On Database Programming Courses(2)
  12. Database Programming In Vba 6.0(1)
  13. How Many Concurrent Users For Oracle Database?(1)
  14. Database Size?(10)
  15. My Sql Database Help?(3)
  1. Need Help In Database Auto_increment(9)
  2. Connecting To A Remote Database(9)
  3. Database(1)
  4. Integrate Access Database Onto Intranet Site(5)
  5. Accessing Ms Access Database From A Centralized Location?(5)
  6. Mysql Database Management(1)
  7. Mysql Database Entry By Excel Sheets(2)
  8. Space Needed For Database(10)
  9. Database Access On Remote Server W/jsp(0)
  10. Some Useful Database Links.(7)
  11. Best Database(13)
  12. How To Understand A Database Schema(4)
  13. Free Or Opensource Database/schema Browser?(6)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 09:32 PM