|
|
麻烦翻译一下,下面这段文章:xhan
) ]" T1 _9 y( _8 a* }2 G1 `4 ~8 A$ z# G& S
- 1 r1 y# @' Y, y/ I: u _) S
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 W9 f! Y9 J+ L) ` - ; [3 d1 Q5 ^5 x
- ### What we need ###
& j& i( _0 Y+ u3 F& ^ - Naturally, we will need a MySQL server to store the data for us, this document + ~/ u1 ^& `2 }3 E& I
- will not explain how this can be done - there are documents out there for the . L8 {9 D9 c" }1 F) u5 ]- y
- interested. The requirements include a (empty) database for TeamSpeak to use; Q5 \' U8 Z7 y3 j/ }5 d
- and a user account (username + password) that has the permissions to do stuff) {1 B0 N- m' T5 J; l7 n
- with the database. Additionally, you will need a vendor library installed on the
6 h/ v5 N8 X+ S2 @8 q% Q - local machine, this came with my MySQL install.5 A# a" @9 A) L: n
- These instructions will not tell you how you might transfer your data from the/ G0 ]' [& C4 g K3 s
- SQLite database to the MySQL database, we start with a clean and empty MySQL! o0 x+ M1 g4 s w, o% L1 e
- database.
: s, n V3 l) i4 ^: }3 |/ M K - Some users have reported ways to import a SQLite database into MySQL, but at
/ z" q1 U4 Y0 @( A - the time of writing, there are still too many issues - check the current status. v+ u/ B% s* f/ O. k1 {/ D/ }
- in the TeamSpeak forums if you are interested.
2 g" _! d' D, c - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
1 Q2 U U. n" \) N* @( e( A - Borland was used. This driver can only interface with the client library that $ |, N, Y+ [" _, j
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 }/ ?# Y+ _2 I' {) c* M
- client library - basically all you have to do is to use a 3.x client library as
/ A' C2 p1 i6 @ - "VendorLib" and a 4.x database to connect to. q2 T* z0 U0 p3 y s
- If you need more info about dbExpress, you can contact Borland.
; t, s/ ~* v5 ?* T* u4 [ - " X0 K3 o1 r" h2 |
- ### Doing the work ###
/ [! M% f2 F) h3 V7 H1 T; y H - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 S, q$ Q. p/ o4 o4 M
- the perquisites right, just open your server.ini file, and add this section at! o) g [9 s$ l6 _) S
- the end:
5 W3 O Z, S1 L! B" Q; @) w - ---cut here---
& p/ J8 v! j0 H - [DBEXPRESS]
, I$ @3 U! T1 I - sqldir=mysql_sql+ \) W/ _: [9 G/ j4 |- h
- Drivername=mysql( d Y3 \" L" r& P \4 M! C& c4 K, t/ S
- Database=Your_Database_Name_Here
" `, ?3 ]4 ?4 C& y, j, n7 s7 j - Hostname=The_PC_the_MySQL-Server_is_on: T6 S0 N+ j% `8 J* r
- User_name=User_name_on_the_MySQL-Server$ [/ l( ~: ?. I( f- m8 h- o
- Password=Password_to_go_with_above_user_name0 C& j3 T: O, ^ B. c, k: F8 n
- GetDriverFunc=getSQLDriverMYSQL
3 t8 Y; Q- ?1 n4 C - VendorLib=path_pointing_at_your_mysql_vendor_lib
% k* W1 v! p9 t+ n% O* _ - LibraryName=path_to_libsqlmy_libary* w2 g& u8 O# }
- Active=1
C& B/ [& s! d( [2 E - ---cut here---
# \% H* C- W4 B/ a& V: S5 r - In my environment (a linux box with a MySQL server running locally) I have:
+ V7 E% T' T8 H1 @/ j) d$ s" A - ---example---
! K( i- }) s* a( c - [DBEXPRESS]9 b; J. u9 N: J
- sqldir=mysql_sql
0 q; r4 N$ \+ R: j2 y - Drivername=mysql" P: ]6 f; u6 O- H Z y4 L
- Database=test0 u, S* ~% y& O% z7 C4 H$ |
- Hostname=localhost
3 W4 E- f0 X% y - User_name=testuser
! _: N4 {7 h( R. R: p) e - Password=my_password/ i7 ^: G, t4 \( @( [
- GetDriverFunc=getSQLDriverMYSQL7 I+ s: Q* r8 r7 H w) u2 [$ V
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ B1 ], h: G; ]7 l1 w$ f- c
- LibraryName=./libsqlmy.so
- h9 I. s7 K5 J1 R# w6 ?) S" { - Active=14 r6 N' \0 N3 k$ R% D% ?5 f
- ---example---0 `& r' U* V. d( J$ j
- 2 G% K5 U, |; ?$ H! `7 p) y5 a
- On a windows box, also running the MySQL server locally, it would be:
+ I3 P: H/ V8 h5 q7 x - ---example---4 X$ }# D0 _- @2 B) k n
- [DBEXPRESS]
$ y! U; L2 R4 e, B - sqldir=mysql_sql0 l. R0 e& }# g
- Drivername=mysql
a+ _; H% M- } - Database=test3 G% Z" ?0 q+ k) g
- Hostname=127.0.0.1
9 J, u8 R* k1 u/ z - User_name=testuser6 t! V* ?5 L+ I
- Password=my_password! G( Z Z7 A. Z; u+ f1 y L
- GetDriverFunc=getSQLDriverMYSQL
; U( x8 E# A/ j# b* y. c - VendorLib=libmysql.dll6 a5 P9 v2 s0 P$ P
- LibraryName=dbexpmysql.dll
% }/ J3 O. x7 S; c( `; W - Active=1
% s0 V; H+ Q! n7 V I1 Z- v: v - ---example----, z. ^) \8 S. {
- - written 02.03.04 by pwk.linuxfan
/ _ q7 {" Z* P' I - 5 R0 v; C% k: K& M: S5 j9 i
复制代码 |
|