program Connect;

uses MySQL;

var
  MHandle: PMySQL;

begin
  MHandle := MySQLInit (nil);
  if MySQLRealConnect (MHandle, '', '', '', 'test', 0, nil, 0) = nil then
    begin
      WriteLn (StdErr, 'Cannot connect to MySQL Server');
      WriteLn (StdErr, 'Error Code ', MySQLError (MHandle))
    end
  else
    begin
      WriteLn ('ServerInfo    = ', MySQLGetServerInfo (MHandle));
      WriteLn ('ClientInfo    = ', MySQLGetClientInfo);
      WriteLn ('ProtoInfo     = ', MySQLGetProtoInfo (MHandle));
      MySQLClose (MHandle)
    end
end.
