|
|
麻烦翻译一下,下面这段文章:xhan , I& X3 D) R [4 ?6 c2 T
0 R4 q4 S; N" N6 u1 D! b: x5 S4 e
- / ~9 _( Z/ c. J. z& Z4 i, S: P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& j- u9 ^3 _. B2 z8 F, T
- ( J9 h8 ~, Q) H2 b
- ### What we need ###
2 s; K' F/ o- [( [3 V8 j! Q - Naturally, we will need a MySQL server to store the data for us, this document
2 p+ e0 J7 n2 V& V5 F( ~+ y( G - will not explain how this can be done - there are documents out there for the
+ L7 |# ?* C" ^$ P9 [* { - interested. The requirements include a (empty) database for TeamSpeak to use* {# h# z z6 r$ Y
- and a user account (username + password) that has the permissions to do stuff
6 |+ l! @$ Z% ~! d+ c - with the database. Additionally, you will need a vendor library installed on the# s; E4 J+ ~" F4 z0 e1 d
- local machine, this came with my MySQL install.
& M& n+ ]+ a6 R' [ - These instructions will not tell you how you might transfer your data from the& G1 d) S0 j# Y8 a
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 Q# }3 z' t% t0 l8 R. f. C5 D& J - database.
& O6 w9 b- ` S8 L- C* P- i q8 k9 d - Some users have reported ways to import a SQLite database into MySQL, but at0 `! C4 ?' q h4 o' Z
- the time of writing, there are still too many issues - check the current status
2 H+ d# B; `0 e% T4 X) H- } - in the TeamSpeak forums if you are interested.# c" G+ O7 ?8 n5 H1 F4 P' t* N
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, Y( j, o& `: l- Y, Q/ x - Borland was used. This driver can only interface with the client library that 5 h) r. f4 w! S& p/ ?: d: w/ c
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; f+ _$ j Q5 A8 r2 j - client library - basically all you have to do is to use a 3.x client library as & C+ r3 e% F% u' B5 v
- "VendorLib" and a 4.x database to connect to.
- `) s8 u7 q$ _- R0 |, d) T - If you need more info about dbExpress, you can contact Borland.
: o- F9 h9 H k4 Q* h* R - % O% ~, e4 R" E+ A( ?
- ### Doing the work ###
, c- ^- z. o6 F; ^' ^) V% q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" ]2 \) S: d \2 h" U3 H1 ` - the perquisites right, just open your server.ini file, and add this section at
7 |" i+ H$ I! T2 T$ z - the end:$ r5 W9 z; l7 M1 c- \: D" J
- ---cut here---
: H) l6 ]3 }% p- l5 I - [DBEXPRESS]
- R( i/ F6 y; a( t* O$ I - sqldir=mysql_sql- ]% _. o; _/ |/ Y3 F
- Drivername=mysql
5 H# U4 Z5 P: w4 P X - Database=Your_Database_Name_Here, t7 o5 L/ J& J! s( |6 V, f
- Hostname=The_PC_the_MySQL-Server_is_on" `* C& O9 j+ e7 T; @
- User_name=User_name_on_the_MySQL-Server9 |' M% a% Q1 w5 @
- Password=Password_to_go_with_above_user_name
2 }/ M: C' X+ X# _! R1 n+ U( s. B - GetDriverFunc=getSQLDriverMYSQL
9 v& m) t$ u, i4 k9 A1 B6 D - VendorLib=path_pointing_at_your_mysql_vendor_lib
+ O% V- s# o# \: ^ - LibraryName=path_to_libsqlmy_libary
: l; h; @ l8 E7 j% I - Active=1
3 @: f, C+ e' G$ h0 F* b - ---cut here---- ?2 e' M W) O4 j3 \ e( r: _
- In my environment (a linux box with a MySQL server running locally) I have:% V1 Z: v8 d0 M+ B7 M" @
- ---example---
1 C: r" v& G- h - [DBEXPRESS]# P$ Y& x& a+ G* f0 |
- sqldir=mysql_sql
7 D% C- m) n8 u6 S2 A - Drivername=mysql
6 I. T8 ^! B+ }& } - Database=test, K! {. r. l6 P
- Hostname=localhost
( U5 }: B3 F* S: V8 T7 a# j, I - User_name=testuser
# J) a6 D; I( Z3 {1 t3 d) w) N8 D - Password=my_password
; N1 n) U( r0 U' A: W) J6 q: g - GetDriverFunc=getSQLDriverMYSQL
' x, G# y' u$ t" i. G5 w( k; D3 } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 y- x4 s% [) P7 T; @2 _
- LibraryName=./libsqlmy.so
: T4 D7 ^6 ^' |# I* e( G - Active=1
$ G t, r- h6 X s - ---example---
D u- L9 |6 ~& Q8 r" d& h - ) k8 e* t3 Q" K% N
- On a windows box, also running the MySQL server locally, it would be:' ~( \# z7 h( D: }
- ---example---
1 A2 P9 r6 V! N. Q# h - [DBEXPRESS]9 ]8 w, X. j7 t) g
- sqldir=mysql_sql
/ G6 G0 Y0 z+ N8 x: ^5 S - Drivername=mysql& p5 `$ ~ B9 W9 ^% _. I
- Database=test
( e# }! i$ B, B' `: ~8 N - Hostname=127.0.0.1
- d3 p+ ~1 c% S0 b - User_name=testuser
3 G L) ?+ a/ ?1 ~3 F; l/ \( r8 A - Password=my_password
1 ?( r" Q/ {3 F Y7 B$ M0 V5 e - GetDriverFunc=getSQLDriverMYSQL* ?( I) ^: R/ O; ~, z
- VendorLib=libmysql.dll# T; D0 e. @8 @: z
- LibraryName=dbexpmysql.dll
9 F6 c4 V) R3 I- T$ C3 ?. ` - Active=1
4 K* r: `. z! ~: K% }, B' J3 j% z - ---example----
( r+ {! d: @2 x5 N6 w( a" o, B - - written 02.03.04 by pwk.linuxfan
: O3 K9 c8 P& l - j: O! W& k) r) O. x
复制代码 |
|