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

I'm completely new to both MySQL (& VBulletin), but I'm wondering if given the username/id and password (held in cookies) if a perl script could then access the database and check it's valid?

ie: I only want particular people registered (infact subscribed) members to be able to run certain perl scripts...

I'm hoping someone has a working example to show me the basic workings?

Thanks...
  • Comment on Has anyone access a MySQL VBulletin database?

Replies are listed 'Best First'.
Re: Has anyone access a MySQL VBulletin database?
by marto (Cardinal) on Jan 31, 2006 at 16:37 UTC
    Hi NeilF,

    The VBulletin configuration scripts should have the database connection details (host,username and password) that it is using to connect to the MySQL database. You could then usen DBI (you will also require DBD::MYSQL if you do not already have it) to connect to the database via Perl. Check out Reading from a database from the Tutorials section of this site to give you an introduction to DBI.

    Once you have a working database connection set up you will be able to run a query using the user login details to validate their accounts.

    Hope this helps.

    Martin