|
|
麻烦翻译一下,下面这段文章:xhan 6 V* v5 @0 G: a( D
3 g- ~1 K4 X6 p/ y& |) \% Z-
) j7 @2 |+ L: w% { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 h8 D6 W/ f2 s% m4 c/ n v7 z - # T* x# k' \1 k4 O9 d
- ### What we need ###
* r/ v/ g$ N; z& f: z' p% n - Naturally, we will need a MySQL server to store the data for us, this document
7 h9 l- Z' c' m" V - will not explain how this can be done - there are documents out there for the ~0 o1 Z" a2 K6 h/ i
- interested. The requirements include a (empty) database for TeamSpeak to use7 M1 h/ S9 X, V& a$ \
- and a user account (username + password) that has the permissions to do stuff: \; W6 C8 B$ `/ V
- with the database. Additionally, you will need a vendor library installed on the
# F) b" U- A+ _! I9 G$ G - local machine, this came with my MySQL install.6 [# S2 C' g# h
- These instructions will not tell you how you might transfer your data from the
# Q' {9 \0 G2 o3 q# \2 X# t* p - SQLite database to the MySQL database, we start with a clean and empty MySQL
- }5 k2 ~$ N3 Q. D/ E) S - database.2 v: E' I( r! M" X' |$ L* C" X& W& L5 i
- Some users have reported ways to import a SQLite database into MySQL, but at% U c: G% k! l3 V
- the time of writing, there are still too many issues - check the current status
& t# h% e. A k o4 j - in the TeamSpeak forums if you are interested.
$ p' R9 f% m K( ]0 ?/ E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: z+ q+ K+ ]/ d: r- N- G' ~6 S - Borland was used. This driver can only interface with the client library that - Y' `1 Y- S; P- V
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 i8 m: f' T# X* u' t# K$ S
- client library - basically all you have to do is to use a 3.x client library as . {1 D% d% F! ^- ]
- "VendorLib" and a 4.x database to connect to.% X5 Y& d1 o6 |, [3 ]$ w" {
- If you need more info about dbExpress, you can contact Borland.
% H" t+ r- P7 s4 N
* ^: x2 _) K% p7 z B: M- ### Doing the work ###
: ]9 Z- v3 w0 K7 y* w - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
9 r) ]+ h1 u6 J4 w2 Z" q - the perquisites right, just open your server.ini file, and add this section at6 L: g* L1 ^, O/ u- |6 Z
- the end:
2 S5 }: Y# H$ B- \$ Z3 _8 N) X2 z - ---cut here---* A3 ]$ ]6 l" H6 o6 m# c
- [DBEXPRESS]* {8 x6 t9 |- u5 h- @1 c9 z
- sqldir=mysql_sql
0 R$ o( a2 _) v+ W7 N, J - Drivername=mysql ~& h3 U0 w7 J: e: j
- Database=Your_Database_Name_Here( Q; i2 [* A9 V
- Hostname=The_PC_the_MySQL-Server_is_on: s8 O$ i, z. C0 ~
- User_name=User_name_on_the_MySQL-Server
: p2 i: ^# m6 H - Password=Password_to_go_with_above_user_name
6 q/ R# D7 e/ i. c3 b - GetDriverFunc=getSQLDriverMYSQL
4 s2 f* m2 u5 A9 h1 y" l4 W - VendorLib=path_pointing_at_your_mysql_vendor_lib
+ ~) q8 _8 \* ^/ `, \0 G0 K - LibraryName=path_to_libsqlmy_libary2 u* j6 @& d4 _$ N% w. S: Q
- Active=1
' D: ^0 E% [( f& D - ---cut here---
/ ?! H! F/ v' } - In my environment (a linux box with a MySQL server running locally) I have:# P$ ~" m7 x% _% {) J
- ---example---# o5 X. ?* o6 ~1 z8 o4 c, S4 C
- [DBEXPRESS]
+ q: @3 D4 E$ u: A+ H2 N - sqldir=mysql_sql
( ]4 \! {5 R k1 O, Q - Drivername=mysql
5 K( G" h# C. W1 q) |* D0 i4 z+ Y - Database=test
; a& p {, d2 E, _3 P( l" b - Hostname=localhost" L: T. K! B/ L' w6 d D
- User_name=testuser7 c2 d R) R2 m3 Y; ]& B* y$ v1 o' k
- Password=my_password
8 i" j" Z* m+ }$ L0 o - GetDriverFunc=getSQLDriverMYSQL
& b* z# ?. J& e5 I+ o9 [' N - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
. t1 t- m" i3 Z7 Y2 { - LibraryName=./libsqlmy.so
' F4 h. u: e# n# s5 R1 _' @8 Z - Active=1! c& f9 f1 k3 f/ c' ]
- ---example---7 U* o9 C/ e8 T8 x; ^- J$ F
- . \' i c8 y& f% n- Y
- On a windows box, also running the MySQL server locally, it would be:
$ k( l9 Z* N2 i2 X& g* r/ ?. [ - ---example---
2 K1 l! p" s p! x - [DBEXPRESS]' p& K4 i0 I: k$ a3 R. _3 f
- sqldir=mysql_sql, P1 E3 a y( O$ M; l# T
- Drivername=mysql
& T' \) v% i& g) O2 u2 X" w! J+ @ - Database=test! J2 {6 t. ]- E0 u; H5 f
- Hostname=127.0.0.1
- g1 |! c. T% W' x, [, |* d - User_name=testuser
; G3 a# y2 @, \5 Z - Password=my_password1 x5 k3 b" l. @3 _" c3 u
- GetDriverFunc=getSQLDriverMYSQL
' E8 ^( i' K" B/ g4 G8 [1 ?8 K1 L - VendorLib=libmysql.dll
( d8 d. M% t# i5 W O# T - LibraryName=dbexpmysql.dll; Q3 q- s6 ]3 q8 {" \1 J
- Active=1
4 M. u( v9 p& h" B, }7 B - ---example----+ e0 \3 F0 S, r9 e
- - written 02.03.04 by pwk.linuxfan
5 ?: |) i8 y* p2 b8 y0 _( U# c. b
& B6 Y3 d# q5 B5 E5 k
复制代码 |
|