>From this point on you have to read the mysql documentation on creating users etc. >Again perldoc DBI and perldoc DBD::mysql are great resources.
On Fri, 31 Oct 2003 19:46:36 -0700 Bryan Harris <[EMAIL PROTECTED]> wrote: > > > When perl wants to connect to databases (any database) perl uses a database > > driver. This db driver is called DBI. Each DBI has an interface to each > > vendors database called the DBD modules. So depending on the kind of database > > you are planning to use, you will HAVE to install > > > > 1) DBI > > 2) DBD for MYSQL, ORACLE, etc..... > > > > depending on the OS you are using, you can go to cpan.org and search for the > > modules and download and install the DBI and DBD modules. > > Awesome. I just did it and it worked fine (except that it failed one test > on the mysql DBD "make test" part)... > > > > Then you can use the code below to test your db connection with perl. > > Hope that helps. > > >>> First make sure you can connect to the database > >>> #!/usr/local/bin/perl -w > >>> > >>> use DBI; > >>> $dbh = DBI->connect("DBI:mysql:database_name", "username", "password") > >>> or die "failed to connect"; > >>> print $dbh; > > This doesn't work for me... Here's what I get: > > powerbook 3% cat dbtest > #!/usr/bin/perl -w > use DBI; > $dbh = DBI->connect("DBI:mysql:test", "testuser", "testpassword") or die > "failed to connect"; > print $dbh; > powerbook 4% ./dbtest > DBI connect('test','testuser',...) failed: Access denied for user: > '[EMAIL PROTECTED]' (Using password: YES) at ./dbtest line 4 > failed to connect at ./dbtest line 4. > > I tried every user/pass combination I could think of, what's it supposed to > be? > > Sorry I'm a little slow on this. Thank you so much for your help so far... > > - B > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]