|
|
麻烦翻译一下,下面这段文章:xhan
; P' V! x! R+ C7 x8 U) f
3 _- w! b" c6 u% l* V! W! X-
# I! L3 ^# V+ n; ^ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( `$ C& P }$ Y6 ~$ I
- * a$ J* ], c+ Q) L3 l. F
- ### What we need ###/ `0 k: D" h- l
- Naturally, we will need a MySQL server to store the data for us, this document ; [3 B. v, A2 X2 \. u, b" q0 x) Z% Y
- will not explain how this can be done - there are documents out there for the 6 W* l2 A- {7 C6 Z, s
- interested. The requirements include a (empty) database for TeamSpeak to use
' d& u+ O0 ^& t9 z2 m F1 C - and a user account (username + password) that has the permissions to do stuff
0 x) P* Q& l0 C - with the database. Additionally, you will need a vendor library installed on the2 O1 L' q( ~* C" G- R) Q; u. k
- local machine, this came with my MySQL install.; o$ n' u4 a1 Y6 l! P. y9 o6 I
- These instructions will not tell you how you might transfer your data from the
& ^& T/ t0 L% l3 X& C. M+ ^) f - SQLite database to the MySQL database, we start with a clean and empty MySQL
" ^0 B1 @( q0 ^: B. C* q q0 O3 x - database.
5 A- r8 D6 K+ _; P6 Y0 F0 K: N+ J - Some users have reported ways to import a SQLite database into MySQL, but at7 ^* [. e) z# N' \+ y9 S9 o6 r
- the time of writing, there are still too many issues - check the current status! U9 ~8 p6 [( O* U( S
- in the TeamSpeak forums if you are interested.
' l, G, m* `: l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 }2 R+ I( U/ ?3 R5 ` - Borland was used. This driver can only interface with the client library that
4 z* Q C( I- k/ G; V& Q5 e- T - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ } P* r. `% \2 d& @, M - client library - basically all you have to do is to use a 3.x client library as
0 U; W% M, }5 y {+ A Z - "VendorLib" and a 4.x database to connect to.) h& Q& f/ k) F/ w# \
- If you need more info about dbExpress, you can contact Borland.
+ l' @! L5 k2 x" h% l. U. ~
: o8 {$ Y9 _7 k7 A* E# q4 t4 [" ?- ### Doing the work ###
3 a- R4 P, ?+ \$ h( E: E& @$ _1 B7 } - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: S* S+ w+ b) k, v: f) w4 h; ?) I - the perquisites right, just open your server.ini file, and add this section at. l8 L: |: k! e' S8 u
- the end:
- i5 Y- |4 E+ l& V' q - ---cut here---' `* A2 k5 s8 m f- m
- [DBEXPRESS]
0 C T @' X, \; B& c I3 K0 V - sqldir=mysql_sql
~! S7 V; ~% q {6 J - Drivername=mysql
! T4 e8 P, W5 O# J% A# ` - Database=Your_Database_Name_Here
% I: s, C. k p: \ - Hostname=The_PC_the_MySQL-Server_is_on
3 l' T* G- w5 ^9 w5 J% \ - User_name=User_name_on_the_MySQL-Server# x, a' ~; l0 x* g
- Password=Password_to_go_with_above_user_name- E; v6 Q& A6 X/ ]) o
- GetDriverFunc=getSQLDriverMYSQL$ Z3 H! m2 g9 U" s) V
- VendorLib=path_pointing_at_your_mysql_vendor_lib* T- p0 \) A9 x# Y2 X
- LibraryName=path_to_libsqlmy_libary
' N" c2 n6 U/ h" N3 s7 E - Active=15 G& h2 j) P6 A
- ---cut here---4 g7 A) W2 o. ?' w: r0 {
- In my environment (a linux box with a MySQL server running locally) I have:% x) m0 R* j3 T: d |
- ---example---
: `2 x0 M3 l* J4 d, b9 z - [DBEXPRESS]6 s4 _' {: H, e
- sqldir=mysql_sql
# `* [- S5 f) ?/ k - Drivername=mysql$ o m( s* S; s3 c% G9 j2 Z% I
- Database=test
% c7 k- _: o& N+ M' t/ o - Hostname=localhost
+ I& O4 R! C; u2 c1 i$ c: e4 Y8 t - User_name=testuser2 I* L" f! Z8 G# V# t
- Password=my_password8 f, j! O# N; a5 N- R7 c& o" y
- GetDriverFunc=getSQLDriverMYSQL
- W, s c% o h& g! w y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( j3 E, s J- _4 h0 E/ B% Y - LibraryName=./libsqlmy.so% |. I7 x$ l" o: R4 j3 G2 J6 I" a8 p5 G
- Active=1
! j; D0 `2 [+ H/ I( y - ---example---
: C; t5 d2 b7 `% w& K
6 a$ \ a! r9 N7 W, l4 f# O" {; {- On a windows box, also running the MySQL server locally, it would be:6 B$ R- M! _" \1 h7 }9 y
- ---example---1 {: _* Y ?6 ^- x$ c0 ~ t
- [DBEXPRESS]% q6 \5 P6 t2 z! Z' o# i" n; w. h
- sqldir=mysql_sql
% H; s- m& P' U3 f6 A, m1 U% f/ [ - Drivername=mysql8 `* D0 w. v4 G; z: o# }
- Database=test) k+ ^/ H/ i% J
- Hostname=127.0.0.16 `; h! O8 G+ @8 y
- User_name=testuser
& j; h: w% b+ ]1 t - Password=my_password& M% ^/ a0 f- Z) C3 Y0 W
- GetDriverFunc=getSQLDriverMYSQL
" l; j# b+ _ f" N( O - VendorLib=libmysql.dll% g4 c) q8 B, V3 g! {0 {7 p/ z
- LibraryName=dbexpmysql.dll
( e2 }% }0 u6 C+ T - Active=1
7 }% f1 \; B7 A+ {' d; j. t, [6 \ - ---example----: z: [5 B+ U. P( t, H( P
- - written 02.03.04 by pwk.linuxfan
. h M& s$ I7 _# ^$ g - / Q# M# R* L5 |$ ?8 }
复制代码 |
|