|
|
麻烦翻译一下,下面这段文章:xhan , q1 X, A$ _8 f* T7 x
& W# S5 q+ p4 }- ^( G: K8 H-
5 l$ m% u ~* h+ Y - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ####### J& j- {. n! }
- k6 X/ M: A' f$ N& X9 w5 \
- ### What we need ###
3 F; _/ m) p1 e - Naturally, we will need a MySQL server to store the data for us, this document , J5 d2 i/ i2 H4 N3 Z; K9 _
- will not explain how this can be done - there are documents out there for the : k: U% |8 K) [( Z3 h8 B2 Y5 E, Z
- interested. The requirements include a (empty) database for TeamSpeak to use6 F) l- P6 J x% D: f
- and a user account (username + password) that has the permissions to do stuff
! X# Z2 G, A8 E2 m - with the database. Additionally, you will need a vendor library installed on the# A4 z4 }5 R- Y6 b# d7 D8 y
- local machine, this came with my MySQL install.
( I& k! K* M) u* F, m7 S8 V7 R4 P, Q - These instructions will not tell you how you might transfer your data from the$ b1 w* ^$ d. N
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 k2 W; m* y( K) t$ g1 o - database.
6 r$ H7 k! }3 Y- p4 L% I G$ V - Some users have reported ways to import a SQLite database into MySQL, but at
4 R2 O0 X1 G1 H. o/ n: u - the time of writing, there are still too many issues - check the current status6 K# n4 o1 w" R+ f) m' U$ F
- in the TeamSpeak forums if you are interested.
# ?2 U2 K5 c2 A) |5 q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; q+ l, w. l8 `4 N- ` - Borland was used. This driver can only interface with the client library that 0 X! @! j5 ~/ a( z, H% @
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
0 f& W3 G* q# _ - client library - basically all you have to do is to use a 3.x client library as
8 R5 E8 k9 e! [ - "VendorLib" and a 4.x database to connect to.' P, M' B/ H. g6 q5 M4 H" p
- If you need more info about dbExpress, you can contact Borland./ Q, `& K. A7 c# Q+ e( W
- $ U) x# h. U9 b# h) F( V
- ### Doing the work ###
5 }! E, I; t" I3 ^- h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 \+ r e) g& D - the perquisites right, just open your server.ini file, and add this section at
( M1 i- g- p0 i# Z$ U" |8 j - the end:
* r, Y( G0 j% t. H9 [ - ---cut here---$ {3 X# E7 |5 P! q0 L
- [DBEXPRESS]( ^3 [5 _1 t7 f- A' ~$ R2 o
- sqldir=mysql_sql
& Q4 n5 q4 O4 ~6 I5 P - Drivername=mysql
0 s3 H- ~ d7 q. z% _/ G+ o# s, Y - Database=Your_Database_Name_Here4 X/ j, n1 u9 r+ f; s
- Hostname=The_PC_the_MySQL-Server_is_on
- T; o( K3 o1 g: E" n- A" h - User_name=User_name_on_the_MySQL-Server
; R; @3 ^( z, U, E1 R- g - Password=Password_to_go_with_above_user_name) C! D' ^1 X; t' A8 A O
- GetDriverFunc=getSQLDriverMYSQL( P: U. L9 t) T
- VendorLib=path_pointing_at_your_mysql_vendor_lib
& ?( ~: T6 E" F) p+ Z - LibraryName=path_to_libsqlmy_libary$ B- j5 @' r* h3 P6 n( C1 h
- Active=1
9 x9 _, y- d6 a3 F" H# a3 S - ---cut here---4 @' j# `) \* ?
- In my environment (a linux box with a MySQL server running locally) I have:
9 s( T7 [% Y% H: x K - ---example---1 j) \" Z+ o+ ~" q4 X
- [DBEXPRESS]2 N) R" J8 i$ R; ?& S5 s( Q
- sqldir=mysql_sql
2 d1 i3 H) n" _: r - Drivername=mysql {1 g4 _7 p, |4 Z+ u
- Database=test- j3 [' p8 H% Q1 L7 ^
- Hostname=localhost/ g' |" p+ E* ~0 P7 f& X8 y7 Y; s
- User_name=testuser
5 H" O2 \& V) s! C% K - Password=my_password
8 f+ w( C* k, l! h, t' ] - GetDriverFunc=getSQLDriverMYSQL
# K! a+ |: Q# C& N0 _7 K6 i7 F3 p0 M - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; L; |, T5 o9 h& C8 U5 B: n1 J
- LibraryName=./libsqlmy.so: w- l, Q* O* M2 _8 A
- Active=1
! i! z g! @ ?( r, m4 _* K5 q! q3 S - ---example---
& P$ b6 o* b/ e0 w - 5 v. h% N0 X% M
- On a windows box, also running the MySQL server locally, it would be:
) }1 d3 K# ~4 S6 h, u - ---example--- f5 G# A. x* l. D+ ]
- [DBEXPRESS]. D% \: l: y8 C7 A: u) F: f; n5 g
- sqldir=mysql_sql1 X5 n; J8 G- s+ |
- Drivername=mysql
% Q' A$ P- w# |2 k& N" w - Database=test
G' w9 ?8 A x y! V: w8 Q! J - Hostname=127.0.0.1- T. k/ P. E% F* F6 w$ x
- User_name=testuser8 P! L( W6 E& ^. p0 o. c, {
- Password=my_password
* H6 N; y1 E, L8 P, i - GetDriverFunc=getSQLDriverMYSQL# M8 @. c" Z# Z& \# a0 K
- VendorLib=libmysql.dll/ D3 ?- b: T( G* g: A5 p/ P9 a9 x
- LibraryName=dbexpmysql.dll
/ |/ o" K9 a% V4 Z" I. G- G+ i - Active=1
. G' c) b5 \2 H3 O - ---example----
9 f% I% {* O$ K& K. ?4 p - - written 02.03.04 by pwk.linuxfan$ C& R4 M( V, G- w, O* C, _5 w
T; ?& y* n/ j6 T8 R7 x \
复制代码 |
|