var
  SQLConnection1: TSQLConnection;
begin
  SQLConnection1 := TSQLConnection.Create(nil);
  SQLConnection1.LoginPrompt := False;
  SQLConnection1.Params.Clear;
  SQLConnection1.Params.Add('DriverName=MySQL');
  SQLConnection1.ConnectionName := 'MySQLConnection';
  SQLConnection1.Params.Add('HostName=localhost');
  SQLConnection1.Params.Add('Database=test');
  SQLConnection1.Params.Add('User_Name=root');
  SQLConnection1.Params.Add('Password=');  SQLConnection1.Connected := True;  if SQLConnection1.Connected then
    ShowMessage('连接成功!')
  else
    ShowMessage('连接失败!');
  SQLConnection1.Free;