List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:September 9 1999 9:19pm
Subject:Re: MYSQL
View as plain text  
At 23:23, 19990908, Blain Nelson wrote:
>"R.M.V" wrote:
>> R> I was told by my web hosting company that if I wanted to create
>> R> a database I would have to learn MySQL. What is this? Is it a
>> R> program ? Is it like Access were I get a slew of wizard to guide
>> R> me through.

[ ... ]

>> I just bought Linux Red Hat 6.0 from CheapBytes.com being
>> R> that this is what it take to run this program so I was told; I'm
>> R> loading it on another system that I have.
>
>Okay.  I've never used Red Hat.  I tried once, but couldn't get a boot
>disk to work, so I've stuck with Slackware (zipslack's pretty easy to
>get started with, btw).  Linux is a Good Thing <tm> and will help you a
>great deal in getting ready for the Unix world.  

Rony, I think Blain gave a lot of good information.  But I'm not sure
that you're wanting to "get ready for the Unix world" - it sounds like
you'd rather not know anything about Unix, and just get your project
done.

I don't think that's entirely possible (your hosting company is using
Unix, so you'll have to deal with it somewhat), but I also don't think
you have to become a Unix system administrator just to put up a web
site that uses MySQL.

Your hosting provider is already running the database server, so you
don't have to run one at home.  You don't need to run Linux at home.
All you need is a way to access the database that your hosting provider
has set up for you.

That's not necessarily easy, though.  There are two main types of access
for you to consider; I'll call them "command-line" and "programmatic"
access.

Command-line Access
===================

Command-line access isn't necessary, but it is very useful for testing
queries, making quick fixes, etc.  Your hosting provider probably
gives you a "shell" account on the web server machine (you would use a
"telnet", "ssh" or "rlogin" program to access it - ask your provider),
and you probably can use the "mysql" program directly on that machine.
If you can, then this is the best way to get command-line access to your
database.  You should ask your provider these questions:

    1)  How do I log in to my shell account on the web server machine?
    2)  How do I run the "mysql" client program from my shell account?
    3)  What user name, password and database(s) do I use?

If you don't have a shell account, or you can't use the "mysql" client
program from it, then you can install one of the MS Windows clients on
your own machine (you could also change providers).  I don't know much
about the Windows clients, but if you get this far and need more help,
ask specifically about the Windows clients and others will be able to
help you out.

Once you have command-line access to your database, you can go through
chapter 8 in the manual (the tutorial).  Just type in the examples, and
see how it works.  Doing that will give you a feel for working directly
with the database.  It should be simple to go all the way through the
entire tutorial - if you get stuck anywhere along the way, ask a specific
question and you will quickly get a specific answer back!


Programmatic Access
===================

Programmatic access is what you really need in order to get your web
site working.  What I'm talking about is a way for you to write programs
that will take information out of your database and display it on
your web site.  Frontpage is one such method that works with MIIS and
probably in other environments.  In fact, it's possible that your
hosting provider has support for Frontpage (but I doubt it, considering
their advice to you).

In the Unix world, there are many, many options.  The most common ones
seem to be PHP, Perl (mod_perl or CGI), and other CGI scripts (C++,
python, etc.).  You will need to find out from your provider which of
these are available to you.  Then you should quickly review the products
and just pick one.  They're all sufficient for almost any task, so pick
the one that seems easiest to you.  You should ask your hosting provider
these questions:

    1)  What options are provided for accessing MySQL programmatically?
        Ask specifically about PHP, CGI scripts, Perl, and any other
        supported languages with MySQL bindings.  Ask for the exact
        versions, too, because working with old versions is a real pain.
    2)  Are there any special configuration details you will need so you
        can use these tools?  It would be best if your provider can give
        you working examples that show exactly how to connect to your
        database with each of the tools they support.  You might need to
        use a special user name and password to connect to your database.
        You might need to name your files with a special extension for
        PHP.  You might need to put your CGI scripts into a special
        directory.
    3)  Are there any restrictions on your use of these tools?  Some tools
        might be configured without some possibly-dangerous functionality.
        You might be able to read and write files only in certain folders.
        You might not be able to execute arbitrary system commands from
        inside your scripts.

Once you have decided on which tool you will use to create your web pages,
make a very simple page.  Create one table in your database, and insert a
few rows of data into it.  Then create a page that simply prints out the
contents of that table.

Once you've gotten that far, you're most of the way done.  Now you simply
set up your real tables and code away.  This all seems very complicated,
because there are so many options.  You must first find out exactly what
your provider supports.  That will simplify things greatly.

Tim
Thread
MYSQLR.M.V9 Sep
  • Re: MYSQLBlain Nelson9 Sep
    • Re: MYSQLThimble Smith9 Sep