|
|
麻烦翻译一下,下面这段文章:xhan / a/ N8 X3 R9 S5 P0 i9 S
( `- t) ~* V, L2 j. m- $ d' `5 W( g" p/ ], X! O
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ Y( b9 S5 u6 R L0 ^
5 [/ ~# b- V; B/ M8 L+ P5 l7 o7 x6 o- ### What we need ###
4 P; V2 l/ }' p ?, }& A, s - Naturally, we will need a MySQL server to store the data for us, this document 4 D( ?; W" B8 F) I% j9 k9 [
- will not explain how this can be done - there are documents out there for the
) m# |( h2 N( n6 C* Z - interested. The requirements include a (empty) database for TeamSpeak to use j' l: a) t% X( f7 Y
- and a user account (username + password) that has the permissions to do stuff
" |; |8 h3 F, |, O2 q# r( l5 D- D - with the database. Additionally, you will need a vendor library installed on the
6 V) h& e W( v8 v3 E - local machine, this came with my MySQL install.$ e0 b9 c( t' [+ H7 |( D* z
- These instructions will not tell you how you might transfer your data from the/ ?/ {9 k: E( \: Y1 J
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ Z5 u& W# S# q; f7 O. n* }& G. G/ ?: `8 h
- database.& X: r5 |: }! {! ]! |6 R6 O# ]
- Some users have reported ways to import a SQLite database into MySQL, but at
2 [5 c! R& t* G) Y: f1 ]# E0 S - the time of writing, there are still too many issues - check the current status
' A# I: d* ? D5 U( f: P* p - in the TeamSpeak forums if you are interested., y' g* U+ T0 b" C
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 i8 o* S% U) L" u4 ~% a* d7 u
- Borland was used. This driver can only interface with the client library that
9 t+ i; f v9 U0 w - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; H t i. M9 f2 C - client library - basically all you have to do is to use a 3.x client library as
4 I e- q! o# e) X0 p$ z! p7 W" u - "VendorLib" and a 4.x database to connect to.
* O- F$ L$ n) Y5 g9 z6 \, D4 { - If you need more info about dbExpress, you can contact Borland.6 G. n, ~/ Q% ]
- 7 w+ s& n! S5 u1 T9 s' |
- ### Doing the work ###
1 \; l3 a3 L5 Q! X. l, J - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' M- f$ L ]4 \3 J) R - the perquisites right, just open your server.ini file, and add this section at" _" h1 F9 `2 y
- the end:
! V% D6 n7 J% ~9 W) e - ---cut here---
! A% D( q$ M( }$ t" a. X+ w0 Q) e - [DBEXPRESS]3 P: y; Z* s+ _; u6 u" e y; G& r
- sqldir=mysql_sql6 A5 ?7 X& Q6 H3 m3 [" q
- Drivername=mysql
- E5 i) t. U' z& G$ c g - Database=Your_Database_Name_Here+ _! Q7 n7 l; ?
- Hostname=The_PC_the_MySQL-Server_is_on
y7 ?7 G: N" Z7 G1 O Q - User_name=User_name_on_the_MySQL-Server2 H* A! F5 p) I: h
- Password=Password_to_go_with_above_user_name
; P. q9 F: ^! d" q7 D - GetDriverFunc=getSQLDriverMYSQL) R! \4 X$ w5 ^" O
- VendorLib=path_pointing_at_your_mysql_vendor_lib( ~6 [9 K3 @2 A+ S
- LibraryName=path_to_libsqlmy_libary
0 A2 \/ |3 K ^ - Active=1+ L u3 S2 o, T% w: X
- ---cut here---
. p1 H' \4 x! r. g7 f( ~ - In my environment (a linux box with a MySQL server running locally) I have:5 C' Q) q a- p9 ^; F2 K( G: P
- ---example---& T, H% ]; E9 `! s* h6 D6 q
- [DBEXPRESS]6 m3 [8 w" V) w% ?* d# s, T+ x
- sqldir=mysql_sql
! |: R0 n4 V5 P* t0 G3 }& J, y, n - Drivername=mysql
W7 V) a; j7 }8 f; i9 p$ ^6 s - Database=test4 j4 J) V2 l2 Q& {, m
- Hostname=localhost
- J& k6 z3 O+ \ - User_name=testuser
( x) \7 ^1 ^) X( A, F( z" C - Password=my_password
2 w4 |6 n$ g& o. n - GetDriverFunc=getSQLDriverMYSQL
# ]' f1 U; H4 l: ~$ u6 z3 S - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
% q8 G, E: C" ^3 k! s5 q8 \ - LibraryName=./libsqlmy.so6 M6 g4 P6 U: {( W: S- Y! V& d5 D; @
- Active=13 D4 h; I6 C& z9 j& N( A
- ---example---
2 X7 c! j0 l- A
; R. ~* v% O6 B9 e' ?1 M/ Y* x- On a windows box, also running the MySQL server locally, it would be:/ D7 n: ?7 F5 Q; G* Q, d
- ---example---
4 \# }8 T/ m* k: l* l9 J2 e - [DBEXPRESS]; i8 H) N Q$ ]) d8 E8 n+ ?# ]5 N
- sqldir=mysql_sql
3 Z4 x( j2 p* O& s - Drivername=mysql
y% b- A2 U! E7 o/ @8 a/ X U8 p - Database=test: d/ ` ^, S m+ `! |
- Hostname=127.0.0.1
# A+ _! _# ^, J1 G6 L: I! Z3 W - User_name=testuser5 ^1 J$ D+ K. U
- Password=my_password+ w% u) @* P. ]. u8 e4 E' g
- GetDriverFunc=getSQLDriverMYSQL
& @9 U8 G1 C/ R" d - VendorLib=libmysql.dll) m3 x% X( }5 C3 J9 z* E% s" ?
- LibraryName=dbexpmysql.dll
1 r9 D! O0 K% v4 l - Active=1
6 A1 E: \4 Y4 @' l( n - ---example----
& b! o% W, {8 z) N" O# \ - - written 02.03.04 by pwk.linuxfan
/ v# y; p0 k6 t- p
0 \$ V4 b [8 D" G$ y( A8 c) O
复制代码 |
|