|
|
麻烦翻译一下,下面这段文章:xhan 3 ~( p$ W; [& X. n
9 L- h5 @$ ^& L: a
-
- E- ^7 ?6 q: R+ \7 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: b' L; k4 C) D A" l0 i# R
- ! j9 Q9 U0 d z+ b
- ### What we need ###; U9 Q. ~; _" {8 v( M( K
- Naturally, we will need a MySQL server to store the data for us, this document
! `2 v L8 |! d4 N' L - will not explain how this can be done - there are documents out there for the % m5 v5 W/ t; q: k2 `
- interested. The requirements include a (empty) database for TeamSpeak to use
5 Q/ Y# b' V: N3 @ - and a user account (username + password) that has the permissions to do stuff( h- M. m, k* U$ z
- with the database. Additionally, you will need a vendor library installed on the8 l ~0 R& i1 m6 x5 O
- local machine, this came with my MySQL install.
% c/ F+ o7 w A ` { - These instructions will not tell you how you might transfer your data from the% o9 e# ^( S6 }* ^ A$ [
- SQLite database to the MySQL database, we start with a clean and empty MySQL
) K& ]' E6 l% H( l% Y/ Q. q - database.
9 v+ ?2 q7 m8 z% h2 b t - Some users have reported ways to import a SQLite database into MySQL, but at4 K! P9 O6 R( }( u4 e4 h5 F
- the time of writing, there are still too many issues - check the current status( k6 u, H& }, ]
- in the TeamSpeak forums if you are interested.6 S2 \; I% p+ Y' s/ X& Q6 q# m
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from! S* B( K9 U; _5 \) ?- l
- Borland was used. This driver can only interface with the client library that
8 Z4 u6 i& N; H1 c5 g$ | - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# S! _" L0 m1 g7 D4 Y& h - client library - basically all you have to do is to use a 3.x client library as & r7 U' x) q1 V' v
- "VendorLib" and a 4.x database to connect to.7 j5 n" l1 R4 b1 v$ n0 c1 d
- If you need more info about dbExpress, you can contact Borland.
3 A, }+ S- ~8 Y0 | - 9 f7 V- r8 l, x
- ### Doing the work ###
! z% x' F! n& p" z - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: b. R7 J; \$ _- ? - the perquisites right, just open your server.ini file, and add this section at
, A# n+ R& z6 @9 w a - the end:, L: V6 | A( ]: ?1 _
- ---cut here---
$ x1 J+ v( ^) i - [DBEXPRESS]
% i! {7 F8 R$ u0 f: H* J* k9 R- N: a - sqldir=mysql_sql
, b$ E& @/ B2 D: O - Drivername=mysql0 @" k" H/ ~; g# n
- Database=Your_Database_Name_Here
' s' x2 z k( m5 O8 T3 t" G - Hostname=The_PC_the_MySQL-Server_is_on
& V6 P' G% Y0 R) X3 O - User_name=User_name_on_the_MySQL-Server/ b( n/ B# I+ T0 `/ g4 h; I2 ^- K
- Password=Password_to_go_with_above_user_name4 Z7 s! V7 j+ B. [+ t3 z# M
- GetDriverFunc=getSQLDriverMYSQL' q( f. Z& T3 `7 `. a
- VendorLib=path_pointing_at_your_mysql_vendor_lib
, Z& q( X3 E( S# {3 }* U3 d - LibraryName=path_to_libsqlmy_libary
, y+ F. u1 B/ j - Active=1% z: Z B5 ^) i
- ---cut here---
' s9 C: c6 |, N1 P - In my environment (a linux box with a MySQL server running locally) I have:
( `- ^9 B0 y& O - ---example---
( u, D+ F, n) v7 c0 R: S% v - [DBEXPRESS]
& f) j. e' z# m# z: l8 M - sqldir=mysql_sql1 U* E" g' B8 [+ C' F
- Drivername=mysql- w7 |3 |9 I0 c& L( B! A3 c% F. ^
- Database=test
- m+ ]# w- Y* `0 Y5 F - Hostname=localhost4 c3 X4 f% c* s- B3 L% V
- User_name=testuser
; {2 x) g+ C/ P- A - Password=my_password
. b t) t" t9 ]8 z - GetDriverFunc=getSQLDriverMYSQL
* J7 u2 i* E8 U! A; Y# v - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( Q$ L3 ~4 J9 ^+ d2 o - LibraryName=./libsqlmy.so" K+ r# T3 \1 ~( b
- Active=1
- V" U! X3 _) P) T7 c: y# u - ---example---& C- ^ `% P0 `
1 }' p, i5 `- O" s+ F- e0 o- On a windows box, also running the MySQL server locally, it would be:& ]# S! [: _+ e. h& O& ?
- ---example---
5 g8 T9 X& `- G$ {$ d% ^ - [DBEXPRESS]3 I1 |3 ]% I; R8 C
- sqldir=mysql_sql
5 I% q: U8 k: N7 h7 P6 o# b3 k - Drivername=mysql
' g1 @4 `& ~, ^ S0 X* x$ A+ ^& { - Database=test
8 F) f5 q) W' A4 b, Z( f - Hostname=127.0.0.1
7 ?6 u0 q1 Q' @# Z9 T6 U; q - User_name=testuser. v d+ O$ i5 f; b" h% ?
- Password=my_password
+ O! N' }$ A9 i - GetDriverFunc=getSQLDriverMYSQL) M0 [, O/ U; N1 V& ]
- VendorLib=libmysql.dll# S8 f# ^ r4 R3 q: L/ |0 W/ z2 [
- LibraryName=dbexpmysql.dll
0 H! U5 O, `* `$ I* [1 D2 [ - Active=1' e) j( ?/ x1 q/ m5 I
- ---example----- X0 c" |" ?1 S7 k
- - written 02.03.04 by pwk.linuxfan$ ]) b1 W5 }; l
- / }! F( U0 V8 O! P1 U# R8 U3 c; @
复制代码 |
|