|
|
麻烦翻译一下,下面这段文章:xhan
5 ]; Z6 E( Z( j
4 i. Q- R' m9 ]8 k2 v0 C-
`+ ~* I# G; m7 s: q1 Q3 E& Q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
$ G% ?$ f. ]' h. {) M4 }# \# Z% } - * E- E" K `8 @, m
- ### What we need ###3 h6 I/ C+ a0 V% h' j$ M9 J
- Naturally, we will need a MySQL server to store the data for us, this document 3 U2 R2 K/ \3 b t2 p
- will not explain how this can be done - there are documents out there for the 8 ^9 s) u9 X; |
- interested. The requirements include a (empty) database for TeamSpeak to use
$ Z7 G6 i& ~" ]; d: ~- @5 U - and a user account (username + password) that has the permissions to do stuff
, z- P* x. b4 i/ n, e! C1 o - with the database. Additionally, you will need a vendor library installed on the
! `" v8 J5 Y [8 Q0 L, S+ | - local machine, this came with my MySQL install.
0 s7 V. I2 H/ J( Q# g1 G! { - These instructions will not tell you how you might transfer your data from the
9 w. \% }/ K. N" f+ s& U* o# Q - SQLite database to the MySQL database, we start with a clean and empty MySQL& v6 n# l; g7 j* f, O3 |9 [% g9 T
- database.
1 |$ p5 H7 I/ Z! F9 q0 S - Some users have reported ways to import a SQLite database into MySQL, but at4 O7 s" P& h9 z0 b' r1 X7 _4 ?) q, n
- the time of writing, there are still too many issues - check the current status# f8 g+ p! v6 y6 |6 N- T5 c) D2 o
- in the TeamSpeak forums if you are interested.
7 N2 i d2 c( X8 M6 T - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from: z/ N5 V& M0 l# {4 u' Z
- Borland was used. This driver can only interface with the client library that
& Q6 y7 @5 s) L+ k6 m" m' t7 H - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( U5 K! P$ q! \7 b
- client library - basically all you have to do is to use a 3.x client library as $ V2 v/ M5 `2 D1 D6 [; r( E. @
- "VendorLib" and a 4.x database to connect to.- x% P* r# o9 _
- If you need more info about dbExpress, you can contact Borland.# h. r5 \/ n$ I" q) ^2 \
% |4 x) ]: W) i8 c& T" n- ### Doing the work ###
9 b1 o; S- t1 o C' j0 P G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: z* A" Y5 ~; |+ ] - the perquisites right, just open your server.ini file, and add this section at! z5 b% L( }9 k- F/ q) m
- the end:% m, z( b$ C ]/ w
- ---cut here---$ N6 V, |9 T, H: j1 ^3 D
- [DBEXPRESS]; F5 C3 u% O! b; |# U
- sqldir=mysql_sql
7 ]" P$ }% d7 a! q - Drivername=mysql
3 I1 {/ O; H& j& f - Database=Your_Database_Name_Here, |, c! t- z2 n6 c. ^: g: h0 _5 S4 r
- Hostname=The_PC_the_MySQL-Server_is_on2 q3 Q) t3 l# ]8 L6 P
- User_name=User_name_on_the_MySQL-Server+ z: O; |5 n# Q1 }
- Password=Password_to_go_with_above_user_name+ Y2 e P: o' j' F
- GetDriverFunc=getSQLDriverMYSQL! u* u r& U3 i, h4 d
- VendorLib=path_pointing_at_your_mysql_vendor_lib& T# d( l/ _: `8 b4 O( W7 B) t
- LibraryName=path_to_libsqlmy_libary+ u* `" O Q/ y! c
- Active=1
- p# [. t; N/ i) {' U) _ - ---cut here---' t9 H5 l- E0 a
- In my environment (a linux box with a MySQL server running locally) I have:$ v/ G1 t: G3 S" i6 y# A+ v- m
- ---example---/ b4 u. |2 Y1 |+ y. q6 o' f
- [DBEXPRESS]: T- k( F4 c1 r$ k& P8 R
- sqldir=mysql_sql" s& |8 Z8 P, X- V
- Drivername=mysql1 @* O- h) ~3 Y% o4 U0 P/ \
- Database=test4 a3 O1 P4 ~+ x7 J( N, W5 T& g
- Hostname=localhost
1 `7 [9 k0 M# H4 E& h - User_name=testuser- H/ i( e& _2 u- \
- Password=my_password6 n) {" s4 S& W; l
- GetDriverFunc=getSQLDriverMYSQL' `/ b- w; \- K- C: k
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 H' O6 r$ ?% ~9 K1 B/ k1 A
- LibraryName=./libsqlmy.so
, a) N3 z/ A" d8 r0 [ - Active=1
8 ^8 W+ s* o$ O% b, J( L( \4 }/ P/ l - ---example---5 {$ k8 j! P" s$ F i; [/ u
- 9 W* M. |4 D8 n+ J
- On a windows box, also running the MySQL server locally, it would be:! ]# R1 J9 U5 b( w! _
- ---example---8 u, |7 K# O3 d; j; T
- [DBEXPRESS]
8 i( {0 L! _$ Q) x& ~4 f - sqldir=mysql_sql0 L1 ^* x% u+ ]% P8 D1 H
- Drivername=mysql! O* I' X7 | c* J8 Y" X. E
- Database=test
, S* B2 i$ s& ], u+ k* ]! M - Hostname=127.0.0.1
5 K, I! }8 x" g; z8 [1 { - User_name=testuser
( K. H; U! i6 E' j+ g - Password=my_password
6 z! k0 V9 A% F3 V6 B$ R, W - GetDriverFunc=getSQLDriverMYSQL2 ^3 o) E7 u+ \3 W
- VendorLib=libmysql.dll" K% T3 P0 x# z) f9 E5 ^
- LibraryName=dbexpmysql.dll: F" U/ ~" q1 w
- Active=1; f+ i$ o3 [* M3 I# { I
- ---example----
# M3 s2 I O7 Z- K& v& D% Q# T3 U - - written 02.03.04 by pwk.linuxfan% X# W1 q) w4 L7 Y \( ~
- * z3 g% Z5 Y- h N$ R( D/ s
复制代码 |
|