delphi firedac 连接mysql

  FDPhysMySQLDriverLink1.VendorLib := ExtractFilePath(ParamStr(0)) + 'libmysql.dll';
  FDPhysMySQLDriverLink1.DriverID  := 'MySQL';

    con1.Close;
    con1.ConnectionString := 'DriverID=MySQL;Database=xxx;Password=123456;Server=192.168.239.129' +
    ';User_Name=root;port=3308;charset=utf8;WriteTimeout=300';

//con1.ConnectionString := 'DriverID=MSSQL;Server=127.0.0.1;Database=Northwind;User_name=sa;Password=123;';

  con1.Connected := true;

win32与x64   libmysql.dll  下载地址  :https://pan.baidu.com/s/1-e1KCp2klhSLUw8UFHJEIQ  

提取码:b6ng

猜你喜欢

转载自blog.csdn.net/y281252548/article/details/112649241