Guest User

Untitled

a guest
Jan 24th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. [myodbc_mysql]
  2. Description = ODBC for MySQL
  3. Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
  4. Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so
  5. UsageCount = 1
  6.  
  7. [myodbc_mysql_dsn] # this is your system DSN
  8. Description = description of your DSN
  9. Driver = myodbc_mysql # custom driver name
  10. Server = localhost # or external IP if needed
  11. Port = 3306 # or custom port if needed
  12. Socket = /var/run/mysqld/mysqld.sock # socket, see above
  13. Database = # MySQL DB name or empty
  14. Option = 3
  15. ReadOnly = No
  16.  
  17. +---------------------------------------+
  18. | Connected! |
  19. | |
  20. | sql-statement |
  21. | help [tablename] |
  22. | quit |
  23. | |
  24. +---------------------------------------+
  25. SQL>
  26.  
  27. with AConnection do
  28. begin
  29. Driver := 'myodbc_mysql_dsn';
  30. Params.Add('Trusted_Connection=Yes');
  31. Params.Add('DATABASE=mydb');
  32. Params.Add('HostName=MyHost');
  33. Params.Add('UserName=root');
  34. Params.Add('Password=password');
  35. end;
Advertisement
Add Comment
Please, Sign In to add comment