|
|
麻烦翻译一下,下面这段文章:xhan
, l7 v, S4 {% N
9 O! }1 s' ~: {8 L1 O' |" h5 d-
) ^$ A' q$ e H: O F - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 J# J3 i$ O. W& v1 @6 X3 u
- * m4 g2 v% D' T; |( x$ V
- ### What we need ###6 z* l" Y6 B0 Q! b, S4 f" a o
- Naturally, we will need a MySQL server to store the data for us, this document $ r) O6 k; a2 U
- will not explain how this can be done - there are documents out there for the
( S X \. a% w- Q5 R6 c - interested. The requirements include a (empty) database for TeamSpeak to use
$ R2 B( d& z. T# {! d - and a user account (username + password) that has the permissions to do stuff
2 U R V0 ?# }0 \2 R; r4 S - with the database. Additionally, you will need a vendor library installed on the
) P$ f; y2 J0 w+ l5 x) [ - local machine, this came with my MySQL install.
! t: m/ i6 l% ]4 O0 A; ]# I h5 y) Y - These instructions will not tell you how you might transfer your data from the2 F0 z2 R3 _! Z9 U
- SQLite database to the MySQL database, we start with a clean and empty MySQL, Q* x- @+ l3 K& M% e
- database.
, k1 H7 K9 U3 v) v( A! S# s+ u - Some users have reported ways to import a SQLite database into MySQL, but at
' r# G, s) U. | - the time of writing, there are still too many issues - check the current status
8 i, `/ J( L! n% T. m4 a/ g0 N - in the TeamSpeak forums if you are interested.
" o1 \ L. U( `* P* U. n7 l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* J% u0 F# a- P1 u* b6 A
- Borland was used. This driver can only interface with the client library that # E" K1 L8 ~: l1 l# `. S R4 r c0 [
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 N2 \, q. b Z) h; G& C
- client library - basically all you have to do is to use a 3.x client library as 5 M2 K% e5 n3 ]- L: e
- "VendorLib" and a 4.x database to connect to.8 Z f" I9 k) q K& U: C* O
- If you need more info about dbExpress, you can contact Borland.
n+ x$ r3 R5 @# I
! o; s! Z! @/ E- ### Doing the work ###
' L; M, r8 w# _: J9 v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 S/ V- h5 v% ^: v9 Y9 e. H
- the perquisites right, just open your server.ini file, and add this section at1 n* j/ L4 x& H& o* q: U
- the end:1 R+ T9 |9 ]% F2 D$ r. ]; x+ U* F
- ---cut here---, J) _% B4 n9 |/ r5 r% c x
- [DBEXPRESS]( w" m/ d/ J4 ]3 K
- sqldir=mysql_sql$ E2 l; ?, e$ C4 |
- Drivername=mysql" u f/ @9 F+ _
- Database=Your_Database_Name_Here
0 k: g& e/ A- w% h! j; { - Hostname=The_PC_the_MySQL-Server_is_on5 b7 T8 E x2 I9 v
- User_name=User_name_on_the_MySQL-Server
( C5 f$ }* R( W/ z - Password=Password_to_go_with_above_user_name
$ U+ E2 A+ e& R) N - GetDriverFunc=getSQLDriverMYSQL {' |4 ~: c; H7 x7 M
- VendorLib=path_pointing_at_your_mysql_vendor_lib1 h6 N$ r" I* f! z I
- LibraryName=path_to_libsqlmy_libary+ P1 \! l- c+ m6 y% U4 j
- Active=15 u' K( U K, [# f* O0 I
- ---cut here---
* k, S/ b$ E1 S/ [ c# W: ^ - In my environment (a linux box with a MySQL server running locally) I have:
5 k" h0 T! C+ s$ j! P9 Z+ ~ - ---example---
. \1 _$ _4 u7 K) `: x, n - [DBEXPRESS]
: E- E2 b/ u, ^' b' V) K0 G - sqldir=mysql_sql) |2 a6 b6 A* Q p
- Drivername=mysql
* y4 h( X( M( C - Database=test! x9 O2 f! s4 e* }8 a4 ^
- Hostname=localhost1 c* \1 K' @. ?
- User_name=testuser
) \3 a7 I' y. n& |- \ _# W - Password=my_password
, O. G. a1 M/ n: q - GetDriverFunc=getSQLDriverMYSQL
/ h8 w/ [. [, d+ c! E, L' p2 g8 v0 }: r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
# i' {* {; G4 Z( l7 V. o; j - LibraryName=./libsqlmy.so
7 P$ M: [$ g: Z - Active=16 f% \, \ }+ r6 g& C
- ---example---/ j- G& {) z" _! p9 }8 ^0 A
- 6 P0 \/ a5 o, G" s1 g" d2 o
- On a windows box, also running the MySQL server locally, it would be:6 j8 M2 n9 {% [' o+ _
- ---example---( t# a O5 f( u
- [DBEXPRESS]
+ S# G" s6 Y. p: b - sqldir=mysql_sql
7 C; o5 n3 o6 j; k+ W, l+ T - Drivername=mysql. k0 X* p+ }& ~7 L2 |
- Database=test
# D' R7 F" d. g- J- { - Hostname=127.0.0.1% F" Y0 O: Q/ X/ g7 m! [; q
- User_name=testuser X! H1 } x8 _$ r, |2 A
- Password=my_password7 m" @( K! {4 u o
- GetDriverFunc=getSQLDriverMYSQL' X/ W1 q3 J$ e+ }9 I+ V2 ~
- VendorLib=libmysql.dll
/ o- w# |$ f/ R0 c4 u+ l. o$ A - LibraryName=dbexpmysql.dll H0 W0 C% R$ u( o& v$ z
- Active=1+ V% X; g8 R$ S4 ` }
- ---example----5 U% {$ [3 a0 L" L5 ]
- - written 02.03.04 by pwk.linuxfan
1 {, |3 h/ A. w \/ ~6 H# c - ; b. }4 J6 y1 v2 ?" F6 ]
复制代码 |
|