|
|
麻烦翻译一下,下面这段文章:xhan " L6 g, d' w; T! j/ z7 P) V7 W8 w
, r2 X- q3 I- e( ~8 \8 b- + G( M+ I J4 f' F6 t& e% A1 y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ####### \0 A, a ]/ B$ q( Z) b
" B* g3 l$ ?4 _. W: G- ### What we need ###
* @6 x& H8 `1 G! ]7 z - Naturally, we will need a MySQL server to store the data for us, this document
3 J9 ^9 S8 k5 v. G% D - will not explain how this can be done - there are documents out there for the
2 c, L7 [, v; o, t- } - interested. The requirements include a (empty) database for TeamSpeak to use
/ p! f* P4 w9 e' E - and a user account (username + password) that has the permissions to do stuff
. n g9 [3 W0 G. j' J - with the database. Additionally, you will need a vendor library installed on the$ X# V: \& v0 @ e5 z! n
- local machine, this came with my MySQL install.
6 ?+ M; x, \# ]( |6 k _; \0 U! A; [ - These instructions will not tell you how you might transfer your data from the
( U: U! k6 O3 N. o - SQLite database to the MySQL database, we start with a clean and empty MySQL
. ~; N/ m, M3 q i, d( U6 z - database., d: t& x$ R `' D
- Some users have reported ways to import a SQLite database into MySQL, but at' N2 ~/ ^5 b9 S1 h
- the time of writing, there are still too many issues - check the current status
' ?1 k) i$ I' q9 i - in the TeamSpeak forums if you are interested.
7 v8 z) ?5 l2 x- t$ |' C9 k - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 ^ q4 k2 J {& A2 H! L8 ?: G
- Borland was used. This driver can only interface with the client library that x. n0 T! {- f% c3 N- i
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 O4 e# Y+ ]: v6 K4 X4 G
- client library - basically all you have to do is to use a 3.x client library as
& W5 ?6 k! s6 Z* z - "VendorLib" and a 4.x database to connect to.7 q1 D# M6 J; \
- If you need more info about dbExpress, you can contact Borland.
3 i) ~7 N4 u1 f W: p& T) _ - 7 ]2 B0 c1 d! L7 w" Q
- ### Doing the work ###
+ s% v0 `; M! D$ E5 M5 t8 o3 }9 b - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" N# x1 D! @0 Y
- the perquisites right, just open your server.ini file, and add this section at
: e: n3 O! |; r8 q1 ? - the end:) Y- s# [: S8 r& P3 ~
- ---cut here---
" V3 [' n' s) j$ Z8 B - [DBEXPRESS]- I* |1 y1 }) I8 J; g
- sqldir=mysql_sql% [; Z6 F1 i2 x" e$ j |
- Drivername=mysql) t" A! ]+ M6 {4 n0 Q) B; E- k4 V& T
- Database=Your_Database_Name_Here- g8 l4 [& c9 N
- Hostname=The_PC_the_MySQL-Server_is_on
) @% F/ B" y$ Y - User_name=User_name_on_the_MySQL-Server
1 r/ e9 h U1 D - Password=Password_to_go_with_above_user_name
9 U5 S% j& l S; C - GetDriverFunc=getSQLDriverMYSQL9 L! e0 E7 A% R: o/ b U* \; v
- VendorLib=path_pointing_at_your_mysql_vendor_lib6 |$ x2 J) {! f6 ]# Q4 h
- LibraryName=path_to_libsqlmy_libary
: V# L- q7 G, B e9 P9 c( _" y! | - Active=1
- t, U: q$ W: {# [2 u& d) q, ^ - ---cut here--- o: t* @; j h6 c: D' @
- In my environment (a linux box with a MySQL server running locally) I have: T3 E2 d7 v5 S% g. \2 m
- ---example---( u, z" Q/ F" U5 c
- [DBEXPRESS]
/ K+ e! ^6 ]' k { - sqldir=mysql_sql3 s" ~/ S3 p- c+ ^* c# x
- Drivername=mysql
+ O) i; k8 |7 L7 s- w: N3 ^* @ - Database=test' T7 v/ f0 C" i
- Hostname=localhost
" V4 A- B- r6 [9 U - User_name=testuser
D! T5 I( f, M5 p - Password=my_password
9 m3 g( l0 c+ X* Y! s - GetDriverFunc=getSQLDriverMYSQL: P7 s# g) K9 A% [+ n/ B5 z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 }( s) F7 A' O: }, m - LibraryName=./libsqlmy.so
" b. `- W+ K2 M! n' F - Active=1" F7 @7 e) J' ]/ [/ ?* X
- ---example---
, [+ n7 N$ J( g3 ^8 G0 J" l
0 }6 x% V+ [. X- On a windows box, also running the MySQL server locally, it would be:% I: o1 v+ t/ _4 _/ T( ]
- ---example---: s! \# x6 A% u+ |! e
- [DBEXPRESS]& x) q2 v- M' {- f6 p
- sqldir=mysql_sql
3 R0 d/ D/ }; h - Drivername=mysql
: ~( M- {, S3 _ - Database=test, Q. y( C: U [3 G- i8 i3 G7 y% H
- Hostname=127.0.0.1
4 s2 i8 L$ |: G3 U3 v - User_name=testuser/ k5 `+ G N6 }
- Password=my_password! x; b. t8 y& ^1 a
- GetDriverFunc=getSQLDriverMYSQL
2 Z' K/ y1 b" e6 I! x3 U - VendorLib=libmysql.dll% \: Y6 k( F/ E/ Z+ Y6 y9 R* ]
- LibraryName=dbexpmysql.dll9 Q$ h: ~' ?. [$ D7 p- z7 H
- Active=1" X Z2 W% C$ O" O6 L+ A; `
- ---example----, r- B4 ?' i, N# l; x
- - written 02.03.04 by pwk.linuxfan
$ D: O; a* J9 g* t" H& H. M - 6 [5 l" @$ H' R ^/ |
复制代码 |
|