HOSTING | ORDERS | SUPPORT | CONTACT | SITE MAP |
|
Use the following outline to connect and begin querying the mySQL server from a Perl script. Remember that you cannot connect to your databases remotely due to security concerns. You can only connect from localhost. 1. Declarations You must require the mySQL package for your script to function properly. Do this by including the following line in your code: use Mysql; 2. Connect to the Database Somewhere near the beginning of your script, you need to make your initial connection to the database server. Using the following form, substitute your database, username, and password for the examples to connect successfully. Mysql->connect('localhost','DATABASENAME','USERNAME','USERPASSWORD'); 3. Executing a Query You are now ready to begin querying the database server. [Most problems that you may incur will generally occur due to invalid permission settings for the specified user.]
Updated: 07/19/03
|
There is also an extensive online manual available.
http://hostings.com 888-404-HOST (toll-free US/PR/VI/GU), 706-897-4743