Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [myodbc_mysql]
- Description = ODBC for MySQL
- Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
- Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so
- UsageCount = 1
- [myodbc_mysql_dsn] # this is your system DSN
- Description = description of your DSN
- Driver = myodbc_mysql # custom driver name
- Server = localhost # or external IP if needed
- Port = 3306 # or custom port if needed
- Socket = /var/run/mysqld/mysqld.sock # socket, see above
- Database = # MySQL DB name or empty
- Option = 3
- ReadOnly = No
- +---------------------------------------+
- | Connected! |
- | |
- | sql-statement |
- | help [tablename] |
- | quit |
- | |
- +---------------------------------------+
- SQL>
- with AConnection do
- begin
- Driver := 'myodbc_mysql_dsn';
- Params.Add('Trusted_Connection=Yes');
- Params.Add('DATABASE=mydb');
- Params.Add('HostName=MyHost');
- Params.Add('UserName=root');
- Params.Add('Password=password');
- end;
Advertisement
Add Comment
Please, Sign In to add comment