Creating a database


#1

I am creating a calendar with a variety of events in different categories. I would like to create a database so that the event records can be searched and displayed according to category. I’ve never created a database before and have no clue where to start. Can anyone direct me to a tutorial on mySQL or something to get me started?


#2

Your first step is to go to the Control Panel and select Goodies and Manage MySQL. This will allow you to setup the database (in which you will create any tables you need), together with the hostname, username, and password stuff that you need to use in order to connect to the new database. I recommend staying with the default hostname (mysql.yourdomain.com), by the way.

Once you have done this, you will have to wait a little while for the DNS to update for your hostname (this works like creating a subdomain). Then you will be able to access an application called phpMyAdmin that will allow you to administer your database.

For information on how to create tables, I recommend this tutorial on the MySQL website. For information on how to use PHP to connect to your database and start using it, I recommend this DreamHost Wiki article.


Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#3

Perhaps I misunderstand, but creating the database is extremly simple. Log into the Panel > Goodies > Manage MySQL ( or click this link)

Fill out the form at the top of this page, then click “add new database now”. After 15 min or less you should have a new database set up and working.

EDIT: Pay attention to Simon there, he gave a better answer than I did. :slight_smile:

–Matttail
art.googlies.net - personal website


#4

Thank you both for your prompt replies!


#5

i may be giving extra info but be aware of the hostname and database name.

hostname is the database server name. one server/hostname can have more than one database.

you can select “create new hostname now” to create new hostname when you create new databases

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#6

I’m really new here, and I have gotten the mysql database setup under another account my friend uses. How can he access it? Is there a way to setup a cpanel for him? right now he has his own ftp account to his site. could he start setting his tables up using mysql.yoursite.com web interface?


#7

One thing that these guys didn’t tell you is that when you’re working with “web applications” (which is why we’re all here and why Dreamhost is a “Web Hosting” company is that you don’t normally just create a DB without an application to access it. This application is normally made publicly available and may be login protected. This application is used to access the database for people.

Traditionally we don’t make everyone use phpMyAdmin directly.

If you’re looking for a free calendar application, DreamHost offers WebCalendar as a one click install. It should be quite easy to get it running and should provide about everything you need with a reasonably attractive face AND isolate you from having to do all the messy stuff with the database.

I hope this helps and maybe gets you something a little closer to what you had in mind when you started this trip!

I’ve not used WebCalendar, but there might be some other options that are more like you’d be interested in.

Wholly


#8

He can access the database through DH panel --> Goodies --> Manage MySQL --> PHPMySQLAdmin

cpanel is not available in DH. But I believe if you take a quick view about DH panel, you will find out it is quite useful.

Yes, you can set up database in web inteface. as mentioned above, DH provides PHPMySQLAdmin which is a useful web interface to communicate with MySQL

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#9

I believe I sorted out all the questions I posted. I assigned some priveledges to his site, and created a username/password so he can log in and and create his db tables etc… thanks for all the info so far!