System error

error:  Failed to connect to glossary database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /var/www/research/glossary/common.mason line 179.
context: 
... 
175:  # hook us up to the databases
176:  # do this here rather than in autohandler, since some components
177:  # (image generators) don't inherit from autohander, but inherit
178:  # common.mason directly
179:  $gdbh ||= DBI->connect($m->scomp('SELF:DBIname'),
180:  $m->scomp('SELF:DBIuser'),
181:  $m->scomp('SELF:DBIpw')) ||
182:  die("Failed to connect to glossary database: $DBI::errstr");
183:  # $gdbh->trace(2);
... 
code stack:  /var/www/research/glossary/common.mason:179
raw error






























Failed to connect to glossary database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /var/www/research/glossary/common.mason line 179.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Failed to connect to glossary database: Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (2) at /var/www/research/glossary/common.mason line 179.^J') called at /var/www/research/glossary/common.mason line 179
HTML::Mason::Commands::__ANON__('pagescale', 'mrttpvcvhma', 'term', 'Metasome') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55a0163a4be0)', 'pagescale', 'mrttpvcvhma', 'term', 'Metasome') called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'pagescale', 'mrttpvcvhma', 'term', 'Metasome') called at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x55a01526eeb0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x55a01526eeb0)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x55a0152bac58)', 'Apache2::RequestRec=SCALAR(0x55a0151f2000)') called at /etc/apache2/MasonHandlers/Glossary.pm line 58
MasonHandlers::Glossary::handler('Apache2::RequestRec=SCALAR(0x55a0151f2000)') called at -e line 0
eval {...} at -e line 0