Monday, February 7, 2011

Connection Strings For Programmers

PHP MySQL Connection String:

1$link = mysql_connect('MYSQLHOST', 'u12345678', '123456');
2mysql_select_db('d12345678', $link);

Perl MySQL Connection String:

1#!/usr/bin/perl
2use DBI;
3$db = DBI->connect("DBI::mysql:d12345678:mysqlhost", "u12345678", "123456"

Shell Connection String:

1mysql -uu12345678 -p -hmysqlhost d12345678