Skip to content

Instantly share code, notes, and snippets.

@dynax60
Created August 24, 2010 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dynax60/547379 to your computer and use it in GitHub Desktop.
Save dynax60/547379 to your computer and use it in GitHub Desktop.
Mysql client charset
#!/usr/bin/perl
use DBI;
our $dbh = DBI->connect("dbi:mysql:dbname=mydb;host=localhost",
'user', 'pass',
{ PrintError => 0, RaiseError => 1, mysql_enable_utf8 => 1 });
for (@{ $dbh->selectall_arrayref(q{
SHOW VARIABLES LIKE 'character\_set\_%' }) } ) {
print "$_->[0] = $_->[1]\n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment