|
|
麻烦翻译一下,下面这段文章:xhan
4 L5 X, S9 a8 r V* Y' j% M0 E: C. U' K T- _/ G* l$ T
-
( k# Q% t% w' ~) R% x) }" [ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ####### \" x, r! s% N, D E# B) H
; ~/ g2 R5 K' V$ f: {4 z( R6 N) A2 R- ### What we need ###" F; t5 Y" A" D/ h5 v; ~# S# U( G' C
- Naturally, we will need a MySQL server to store the data for us, this document
7 S L1 j" a+ O: n+ {5 M+ e - will not explain how this can be done - there are documents out there for the 6 \ H8 U# `7 A7 h! J
- interested. The requirements include a (empty) database for TeamSpeak to use
1 d8 g& }) N6 G- q; {* n - and a user account (username + password) that has the permissions to do stuff
' Y. s6 d9 ]$ }$ J - with the database. Additionally, you will need a vendor library installed on the
% c$ `8 }3 s5 X) q3 t% c9 C - local machine, this came with my MySQL install.
( S: x- J- k' E( ~% o: s0 ^+ p - These instructions will not tell you how you might transfer your data from the
( k3 ~- ?. d6 l; r& e: T) Q( n - SQLite database to the MySQL database, we start with a clean and empty MySQL
. m/ T# F9 Z$ g/ Y2 `" I2 n* ] - database.& }. Z. }$ f& l* ~
- Some users have reported ways to import a SQLite database into MySQL, but at
6 ?( D l6 `/ J( l7 [( g - the time of writing, there are still too many issues - check the current status
' }' g9 V1 A; J! n; p - in the TeamSpeak forums if you are interested.
8 r) W2 L( r4 E- H9 } - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. H, q% P* \' J) n" h - Borland was used. This driver can only interface with the client library that . ]% c, ?* I( Q* v) s; i( A+ B
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 |% h' x+ q/ J
- client library - basically all you have to do is to use a 3.x client library as $ ^# x/ D' l5 c
- "VendorLib" and a 4.x database to connect to.. t4 n1 V, s8 V4 V
- If you need more info about dbExpress, you can contact Borland.
$ ?, ^- h, u! a% c: x
5 [) s9 N8 G9 ^, E3 ]- ### Doing the work ###& x' h" T2 r* r& a
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( c$ f9 }. F/ \1 U
- the perquisites right, just open your server.ini file, and add this section at
# N7 a% v+ z% m/ I - the end:. p# |7 z" E7 M2 W
- ---cut here---1 P- h9 X0 B# g8 u1 N+ Y6 N t
- [DBEXPRESS]
0 ?/ d; B* I- D2 u _ - sqldir=mysql_sql
" Z: E1 j$ B. c% n1 y3 K( n - Drivername=mysql* b/ w( r, \! O2 W% k
- Database=Your_Database_Name_Here7 p1 W1 ^" \# ^/ ^5 H% ~4 L
- Hostname=The_PC_the_MySQL-Server_is_on2 e9 `3 [! K; N8 N
- User_name=User_name_on_the_MySQL-Server+ }/ S0 |/ n0 E* `% e0 n9 u, m
- Password=Password_to_go_with_above_user_name7 R8 u4 n4 b$ B. N
- GetDriverFunc=getSQLDriverMYSQL/ ~" `" O* n+ y7 M1 u
- VendorLib=path_pointing_at_your_mysql_vendor_lib- T7 d: E9 J" e
- LibraryName=path_to_libsqlmy_libary
/ H" W" q& u! C4 K* [1 `& W0 ~* X - Active=11 o/ o: k# M+ E
- ---cut here---1 g9 ^! @( Y% Z1 l: l3 x/ O7 i
- In my environment (a linux box with a MySQL server running locally) I have:
* V- B; V; O) ^' L. x/ c - ---example---
/ Y3 i5 l4 t( @, A" D - [DBEXPRESS]) z% X$ o( M9 z
- sqldir=mysql_sql, K# E% }0 d6 p+ n8 ~3 [; W: k9 n
- Drivername=mysql7 N9 i3 Q2 _* B" o8 ^" D/ S
- Database=test# |. q6 [8 O- ~1 B# s$ \8 }5 }
- Hostname=localhost
# k1 v% n' r# t& r, ~. a" E/ x8 s# m - User_name=testuser K1 i& R" H9 m# l# I
- Password=my_password6 Y/ |2 X( e1 O: z& d' z* n& A
- GetDriverFunc=getSQLDriverMYSQL- D4 b t# K& m' J5 U" T
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 u9 _/ D. v( m5 ?; `! j0 w. l ^( A0 J
- LibraryName=./libsqlmy.so. b. Y2 S8 N+ g/ A A4 b' M. L$ h
- Active=1
; ^1 y9 J0 D8 e0 J, i* \7 U - ---example---0 }, @3 e4 g( J2 ~4 d5 M
2 i4 ]: b6 g9 |7 R7 Z- On a windows box, also running the MySQL server locally, it would be:
' S, S( m3 ?" g) r - ---example---5 m9 l6 k6 j5 Z3 R- y. J: V
- [DBEXPRESS]
# F S5 ~2 H( Y/ N8 y1 [8 d - sqldir=mysql_sql3 c* a6 P: A/ |
- Drivername=mysql' O- a% \5 Z% [9 K }9 M" Y" Y. S
- Database=test3 I$ \6 D+ b; R1 }( U- }
- Hostname=127.0.0.1
, c5 G& U0 u$ o. b, h2 r4 }4 R - User_name=testuser' @$ E, D$ t. ^2 a e% j; d
- Password=my_password6 O/ q1 |9 B/ \7 H: D
- GetDriverFunc=getSQLDriverMYSQL
1 B G. C3 O I: T: H6 G, x - VendorLib=libmysql.dll
g& N" F8 o; g9 ^ [ - LibraryName=dbexpmysql.dll, y% x. f- G# c- q
- Active=1
4 V9 @+ ]0 ?6 \0 M, d - ---example----( g# D6 K4 G' d
- - written 02.03.04 by pwk.linuxfan+ Z6 k" S3 K3 i R3 [5 n6 f: W, B2 b
- 2 ^6 _. P4 H/ h0 X+ ?: }2 r
复制代码 |
|