User Tools

Site Tools


classes:general:dbsamples:perl_mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
classes:general:dbsamples:perl_mysql [2020/10/23 18:10] localadminclasses:general:dbsamples:perl_mysql [2021/09/17 17:27] (current) localadmin
Line 1: Line 1:
 +====== Perl example for MySQL database connection ======
 +
 <code> <code>
 use strict; use strict;
Line 17: Line 19:
 $db_conn_string = "dbi:mysql:$db_name:$db_host:$db_port"; $db_conn_string = "dbi:mysql:$db_name:$db_host:$db_port";
  
-# Connect to db on Hrothgar+# Connect to db 
 if ($conn = DBI->connect($db_conn_string, $db_user, $db_pwd)) if ($conn = DBI->connect($db_conn_string, $db_user, $db_pwd))
 { {
classes/general/dbsamples/perl_mysql.1603494624.txt.gz · Last modified: 2020/10/23 18:10 by localadmin