|
|
麻烦翻译一下,下面这段文章:xhan ) n9 t5 h) W# P! P* s
/ O0 @, H1 U; {8 n0 N$ b6 d-
9 E$ H8 L4 _& M+ ]) i - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; C& V2 t: M0 A6 e% l5 }
1 b" w/ Y& V3 k8 x$ V- ### What we need ###2 o# }0 s- q! I, B# j8 ?5 _2 W7 ~
- Naturally, we will need a MySQL server to store the data for us, this document . I( \; y/ A! R: _
- will not explain how this can be done - there are documents out there for the 6 q: h1 e3 J% L" W8 ~' w0 q+ d# j
- interested. The requirements include a (empty) database for TeamSpeak to use$ b U5 }! M6 A" i( q9 K
- and a user account (username + password) that has the permissions to do stuff% L0 U7 t( p& u0 G
- with the database. Additionally, you will need a vendor library installed on the
. [$ l/ [# B: {4 @+ J7 W7 ]+ a - local machine, this came with my MySQL install.
: q: J) o& ^2 P3 F7 Y - These instructions will not tell you how you might transfer your data from the5 V5 e# F" Q5 N% g: L1 N: l
- SQLite database to the MySQL database, we start with a clean and empty MySQL! _, B3 y G `( e
- database.
. m) d1 o# u- E9 Y0 a - Some users have reported ways to import a SQLite database into MySQL, but at
' }" I4 t6 `" z t$ `7 p3 }* a! y - the time of writing, there are still too many issues - check the current status# b# R' s% h7 V3 E5 J$ C. I
- in the TeamSpeak forums if you are interested.1 y* N- w: O u U5 t
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 h, c, I. A- j) M( M2 s/ r
- Borland was used. This driver can only interface with the client library that 5 I) ~. h. B" P# H& y" }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 c |( X7 d; I9 p* w( V: P; V' ^
- client library - basically all you have to do is to use a 3.x client library as
+ U7 w% x0 j( V1 H9 V - "VendorLib" and a 4.x database to connect to.* X/ d) k1 q" N7 h0 h$ q
- If you need more info about dbExpress, you can contact Borland.' O6 o6 i8 `3 C" V! M, C
- I0 B7 c) L! K8 e# m. p- ### Doing the work ###+ y( J1 [+ d1 J
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 _2 Y2 q$ k1 W; |, {4 p t1 x
- the perquisites right, just open your server.ini file, and add this section at
; F v6 i7 k8 N G9 [! j- H. r: u' R - the end:
8 x+ G9 O! D0 a* `6 U3 X5 n - ---cut here---! l5 \8 x6 Y* o1 Y( a; S; S
- [DBEXPRESS]/ e" U: O5 Y1 v$ N" q) X3 I
- sqldir=mysql_sql
, p$ \/ M* k% K& ] - Drivername=mysql$ g2 h9 `) {% x8 g7 w6 w7 E; ?3 d
- Database=Your_Database_Name_Here
* u+ C1 V9 K2 s& @! y3 V/ U/ c6 h0 h! e - Hostname=The_PC_the_MySQL-Server_is_on
& R* j9 B/ R b. x - User_name=User_name_on_the_MySQL-Server
4 I3 n4 f( ~2 l$ v, r - Password=Password_to_go_with_above_user_name2 Z3 T) m% ]' A1 ~
- GetDriverFunc=getSQLDriverMYSQL1 G' W4 e( n, o7 j7 S
- VendorLib=path_pointing_at_your_mysql_vendor_lib% C! {( K2 t# P
- LibraryName=path_to_libsqlmy_libary
! i% Y$ w4 v" k3 z/ } - Active=1
( X0 f" e+ ^% b* @' r1 b' Y/ f - ---cut here---0 B; E }4 f2 E" U
- In my environment (a linux box with a MySQL server running locally) I have:% h+ V B$ `% _, w" f1 H
- ---example---- ?( |; K, ?( _2 |( X
- [DBEXPRESS]$ i# {* F% \! P$ f
- sqldir=mysql_sql
" H) N) s& ?) }5 _ - Drivername=mysql
J$ _; g/ f' m4 q1 T' | - Database=test, i# Z' D0 V+ E) {* n
- Hostname=localhost
3 g. {" H) h+ w. c - User_name=testuser3 ]: d) Y3 {- G6 p0 N3 f; ~
- Password=my_password
% \: J" @9 q' Z8 B$ L - GetDriverFunc=getSQLDriverMYSQL% `( ]/ m8 [% Z' U: J; ] q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
6 n$ Y F4 \- ` - LibraryName=./libsqlmy.so7 ^. ]1 a8 ~9 O
- Active=1. A/ P: R+ T. }7 u
- ---example---+ K1 `2 A# o. E
- - J+ s7 G( R" B2 N; {3 D l8 X6 A8 A
- On a windows box, also running the MySQL server locally, it would be:
$ ^$ n# m, x# F! C( ]: z - ---example---% }$ h9 w5 _2 d& t. |& _: x
- [DBEXPRESS]' t) ~7 N" F( t9 ~" Q, ^
- sqldir=mysql_sql( t8 A, G N6 \, E
- Drivername=mysql
' G" Q: F5 k/ ]( M - Database=test
! R; q# k/ M8 B, U0 N* w - Hostname=127.0.0.1
; I* d6 T0 @9 M3 o3 S X - User_name=testuser
, G9 v2 G; J" A: {+ W0 q - Password=my_password
8 Q/ o) x) U: t - GetDriverFunc=getSQLDriverMYSQL
( ^ u9 ?3 t/ [1 S- f7 x* k1 \ - VendorLib=libmysql.dll; L/ j( h% }- W0 X+ `
- LibraryName=dbexpmysql.dll9 U" F( `8 C3 R5 @2 Y. A
- Active=1
0 W/ S# S# f/ c9 u - ---example----
) e* I6 ~9 Z0 |; e) ~ - - written 02.03.04 by pwk.linuxfan
7 }4 y* R3 z; j9 p4 K7 q0 x1 G - ( f5 `- ^$ y& ?8 Y/ _0 c7 v9 G, p
复制代码 |
|