This requires at least v3.1.0 build 70.
How-to
1. First, you'll have to create the tables, here are the tables structures, download the sql files :
odbc_settings.zip (4.06K)
Number of downloads: 2080 for Mysql, Postgresql, MS SQL (provided by ADutch1), Oracle (provided by Oaxa)
For instance, you can import these tables for Mysql with PhpMyAdmin.
2. Once the tables are created (you should have 8 tables), you'll have to create a file named account.ini in your installation directory and copy this to tell the server to use ODBC :
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
[Settings]
Storage=ODBC
[ODBC]
;ConnectionString=Provider=MSDASQL.1;Persist Security Info=False;Data Source=mysql-odbc
ConnectionString=DSN=mysql-odbc
UserID=
Password=
; Set to 0 if your sql server doesn't support foreign keys (e.g. mysql), set
; to -1 otherwise
ForeignKeys=0
; This setting tells the server how to quote values in SQL queries
; 0 = backslashes characters that need to be quoted in queries (e.g. 'O\'reilly')
; 1 = double quotes in queries (e.g. 'O''reilly')
EscapeType=0
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
For MS SQL (provided by ADutch1) :
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
[Settings]
Storage=ODBC
[ODBC]
ConnectionString=DSN={whatever you named the SystemDSN in the ODBC control panel}
UserID={user account to connect to the DB in SQL}
Password={password if the user account above}
; Set to 0 if your sql server doesn't support foreign keys (e.g. mysql), set
; to -1 otherwise
ForeignKeys=-1
; This setting tells the server how to quote values in SQL queries
; 0 = backslashes characters that need to be quoted in queries (e.g. 'O\'reilly')
; 1 = double quotes in queries (e.g. 'O''reilly')
EscapeType=1
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
For Oracle (provided by Oaxa) :
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
[Settings]
Storage=ODBC
[ODBC]
;ConnectionString=Provider=MSDASQL.1;Persist Security Info=False;Data Source=mysql-odbc
ConnectionString=DSN=ORADC_G6
UserID={user account to connect to the DB in SQL}
Password={password if the user account above}
; Set to 0 if your sql server doesn't support foreign keys (e.g. mysql), set
; to -1 otherwise
ForeignKeys=-1
; This setting tells the server how to quote values in SQL queries
; 0 = backslashes characters that need to be quoted in queries (e.g. 'O\'reilly')
; 1 = double quotes in queries (e.g. 'O''reilly')
EscapeType=1
;-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->-->
3. Then you can create a system ODBC link with the name "mysql-odbc" linking to your mySQL database or you can change the ConnectionString with the parameters to connect to your SQL server.
4. Start the server and in "FTP Server/Logs & Reports/Main log" you should see the line "Accounts storage : 'ODBC v0.1'." instead of "Accounts storage : 'Inifiles v2.8'.".
If the ODBC source is not available the server will report a startup error in <installation path>\g6ftpserver-error.log and will use default inifile storage.
Uninstall
Stop the service and rename (or delete) the inifile, then restart the service.
Problems
Deleting users does not work :
http://www.g6ftpserver.com/forum/index.php?showtopic=1535
Duplicate entry error logged in G6FTPServer-error.log :
http://www.g6ftpserver.com/forum/index.php...ost&p=10014

Help












