|
|
麻烦翻译一下,下面这段文章:xhan
& X( i9 F; _( v8 O, ]5 o7 T; `1 g
-
# [* `. k! n/ V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. q# } w1 {; X' Y; t) O
% y ^7 U2 b# K% c) X0 _7 i- ### What we need ### `7 T. X" O9 q" z* y0 V% @
- Naturally, we will need a MySQL server to store the data for us, this document ) J7 q' ^ N% o% P3 ?
- will not explain how this can be done - there are documents out there for the
# Y3 r+ r \8 c( `2 [5 Y - interested. The requirements include a (empty) database for TeamSpeak to use
: I( {, u2 i% c! E! M - and a user account (username + password) that has the permissions to do stuff# q4 w& A# J. m1 i6 o
- with the database. Additionally, you will need a vendor library installed on the
2 h" R* _7 l8 A6 a% ` - local machine, this came with my MySQL install.
6 ?# ^) X0 @/ d3 N - These instructions will not tell you how you might transfer your data from the1 W: Z: v1 y3 |9 s: X
- SQLite database to the MySQL database, we start with a clean and empty MySQL
5 Z+ d( t O' ~1 p3 |1 Q - database./ u: e$ L- ]% a2 W) u# p4 h
- Some users have reported ways to import a SQLite database into MySQL, but at) z1 z8 w' |* a' @/ Y2 y
- the time of writing, there are still too many issues - check the current status, c- f) |3 h% v5 w- o6 ]2 r. D" W
- in the TeamSpeak forums if you are interested.
9 a7 q0 m# c6 N. J% o - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from' e6 ?/ p2 b. ~/ }6 ^- L
- Borland was used. This driver can only interface with the client library that
4 ? E# t7 S; U ]) h! i# V9 ~7 R; L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. H& N9 M# S5 _6 ^% I - client library - basically all you have to do is to use a 3.x client library as : @1 g0 V- W* ?$ f" A t
- "VendorLib" and a 4.x database to connect to.
3 E8 Y- e3 j0 c P. } - If you need more info about dbExpress, you can contact Borland.% V! Y6 m! Q, d5 I- L
- ) X; g( z1 n6 c; U$ t
- ### Doing the work ###
9 b/ ~) J0 i& R) b - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all) ?8 b2 T: Y n( J0 o
- the perquisites right, just open your server.ini file, and add this section at
4 k* e$ r7 b" w2 o, O, B, R - the end:+ L1 R1 j( F, u0 X0 ~; `
- ---cut here---
8 e" O5 I2 N& X+ O7 x - [DBEXPRESS]
& }5 z5 o6 e, z. I, X- u - sqldir=mysql_sql9 b) c+ {9 Y3 J( O+ U( u4 d# M
- Drivername=mysql
2 J3 v, U/ G2 o - Database=Your_Database_Name_Here4 B+ o( Y% Q$ C$ v* ` D3 e0 {
- Hostname=The_PC_the_MySQL-Server_is_on
7 C$ T2 I7 w$ t - User_name=User_name_on_the_MySQL-Server" E- X" B' N4 X7 E: e- D$ q: k
- Password=Password_to_go_with_above_user_name
6 C5 K. R7 o- i; ?# S# V. j - GetDriverFunc=getSQLDriverMYSQL$ O% V- C8 q" b& |" E
- VendorLib=path_pointing_at_your_mysql_vendor_lib ~3 q+ F7 u1 c
- LibraryName=path_to_libsqlmy_libary6 E+ G2 K$ h- A# o9 w2 e
- Active=1. R2 z6 j3 S7 y2 [9 \( [8 b
- ---cut here---
6 R9 ?; C/ D2 _& {, }7 m3 m! o - In my environment (a linux box with a MySQL server running locally) I have:
6 u# A! w q# x4 X+ F - ---example---
: f( M/ i/ h( |3 j1 L4 r. G' ?/ p - [DBEXPRESS]
6 m* y# L6 ^! d. T - sqldir=mysql_sql8 S& |- C9 F0 }
- Drivername=mysql
1 t/ T. h1 e, ?' c) v3 S7 y# t6 W - Database=test( F& ?; ^7 e* ^, h
- Hostname=localhost
& _. m; A% g* z4 j6 b - User_name=testuser
; }# g$ V8 D! u, S2 j$ T) L* @& V7 M - Password=my_password
# v) H9 j: r I! y8 \, {# y7 V3 J - GetDriverFunc=getSQLDriverMYSQL# A$ J. ~, D8 ~, h
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- ]/ `" R/ e; {1 J - LibraryName=./libsqlmy.so0 R6 `, m! k5 A
- Active=1. Z% l3 F. z/ w, P0 C; u( [. K
- ---example---% ?6 W: z& k* _; ]4 n5 S# d3 y
' z* i* g# ?& F$ x+ d- On a windows box, also running the MySQL server locally, it would be:+ [! w! |& x$ k* E2 U& j
- ---example---
{2 s$ }! Y3 V - [DBEXPRESS]) M& Y9 k* _6 j$ u# H* Z
- sqldir=mysql_sql1 T5 w3 s- b I2 ]
- Drivername=mysql0 C9 y- B. v0 ^ ]+ \9 a
- Database=test
' s; G$ M4 P& Y! A2 J1 c3 ? - Hostname=127.0.0.1
4 b9 L$ `% _( E. C - User_name=testuser+ F% Y9 Q3 V7 S7 Q# S1 e
- Password=my_password8 ?6 _( l9 z' }
- GetDriverFunc=getSQLDriverMYSQL
# v/ S( z, ]/ y - VendorLib=libmysql.dll& L0 @2 a# K! @+ `' t) z c1 ?
- LibraryName=dbexpmysql.dll4 A5 h7 G/ J2 f. g4 l4 |, ?8 w- N5 G
- Active=1! {% P5 R1 E" F% K. n6 l+ m* T
- ---example---- Q3 N* ~. z8 C
- - written 02.03.04 by pwk.linuxfan. R( m7 m: I$ L6 [! \
- " {5 m8 @+ S/ G4 S
复制代码 |
|