Einzelnen Beitrag anzeigen

Benutzerbild von haentschman
haentschman

Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.298 Beiträge
 
Delphi 12 Athens
 
#2

AW: MySQL Embedded DB erstellen

  Alt 9. Feb 2011, 00:46
Moin...
die Zeos Connection kann das. "CreateNewDatabase" ist das Stichwort. Die Syntax ist von DBMS zu DBMS unterschiedlich.
in FB sieht das folgendermaßen aus:
Delphi-Quellcode:
DMDB.ZConnection1.User:= 'SYSDBA';
DMDB.ZConnection1.Password:= 'masterkey';
DMDB.ZConnection1.Database:= DBOrdnerL + DBDatei; // kompletter Pfad zur DB
DMDB.ZConnection1.HostName:= DBHost;
DMDB.ZConnection1.Properties.Add ('CreateNewDatabase=CREATE DATABASE ' +
  QuotedStr(Datenbank) + ' USER ' + QuotedStr('SYSDBA') + ' PASSWORD ' + QuotedStr('masterkey') + ' PAGE_SIZE 4096'); // Datenbank: Pfad zur Datenbank aus Serversicht lokal
DMDB.ZConnection1.Connect;
mußt du mal ein wenig probieren...

Wenn du ein Tool zur Administration suchst... http://dev.mysql.com/downloads/gui-tools/5.0.html... ganz unten downloaden.

Geändert von haentschman ( 9. Feb 2011 um 00:51 Uhr)
  Mit Zitat antworten Zitat