Knowledge Base

Search for:
<< Main Category < Parent Category

How do I connect to a MySQL database?

Answer

Perl:

$dbh = DBI->connect("DBI:mysql:DATABASE NAME HERE:localhost","USER HERE","PASSWORD HERE");

PHP:

$dbh=mysql_connect ("localhost", "USER HERE", "PASSWORD HERE") or die ('I cannot connect to the database.');
mysql_select_db ("DATABASE NAME HERE");

Contact | Copyright Policy | Privacy Policy | Terms of Service | Testimonials

Copyright 2003-2006 AQHost, LLC. All rights reserved.