Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Pretty technical DBI question

by DaWolf (Curate)
on Nov 14, 2000 at 00:50 UTC ( #41420=perlquestion: print w/replies, xml ) Need Help??

DaWolf has asked for the wisdom of the Perl Monks concerning the following question:

Hi there

I'm trying to start programming a script that connects to a mySQL database using the DBI module. Well, so far so good, I can perfectly understand the syntax of it, but I have a real BASIC and VERY IMPORTANT question that is VITAL to start the whole thing.

I'll have to do most of the support for the implementation of this script, and the client have his database ready and a linux server where the site will be hosted, wich is great.

My question is: Where the database must be? How the server will "know" where the database is so when executes the connect call? I know that maybe I'm posting something that doesn't have a DIRECT relation with perl, but I'm really desperate here, since it's my first job on SQL and DBI and I don't even know how the connection actually works....

If ANYONE can help me it would be gratefully appreciated.

Thanks in advance,

Er Galv„o Abbott
a.k.a. Lobo, DaWolf
Webdeveloper

Replies are listed 'Best First'.
RE: Pretty technical DBI question
by mitd (Curate) on Nov 14, 2000 at 08:00 UTC
    Can be a bit confusing at first put here are a few principals /tips that may help.
    1. mysqld is a database server, its job is to allow clients clients to connect to the database. It reside can on any host that the clients can connect to.
    2. mysql (the program) is a Mysql client supplied with Mysql distro.
    3. DBI/MySql-DBD are Perl modules that help make building MySql clients easy.
    4. After mysqld is installed on the server host, I suggest you install mysql (client) on your host and try connecting to server before you attempt any Perl/DBI.
    5. Any problems beyond this point will probably be set-up or GRANT permissions. These issues are best dealt with MySql docs or a MySql support list or site.
    privileges

    mitd-Made in the Dark
    'My favourite colour appears to be grey.'

Re: Pretty technical DBI question
by HaB (Sexton) on Nov 14, 2000 at 01:40 UTC
    You should only have one copy of mysqld running, so as long as you are connecting to the proper port for that daemon, there's no need for the DB to 'be' in a particular location. MySQL keeps everything in one dir anyway, if I recall. You will of course need to send the proper "use <my_database_name>" command to the server once you are connected.

    If you aren't getting errors returned upon making the connection with the username/password, then the connection is working. You ARE checking return values, aren't you? [:

    -HaB

    hword.
Re: Pretty technical DBI question
by Fastolfe (Vicar) on Nov 14, 2000 at 00:52 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://41420]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2021-09-21 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?