|
|
麻烦翻译一下,下面这段文章:xhan
, U. U! J- `, {3 F0 w6 I* }( r& T* c5 i* G0 ^# M
- 7 t' _ @ |" H, H8 {4 R
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( M! t+ y- m& Y/ \& p
- $ \ K: e! }& T \* Y: E2 u3 J
- ### What we need ###& R# }1 k o3 |; D( L
- Naturally, we will need a MySQL server to store the data for us, this document
- Y% C- r+ {4 m( q+ C0 b - will not explain how this can be done - there are documents out there for the 9 n( f' g8 J* o5 D! X
- interested. The requirements include a (empty) database for TeamSpeak to use
& r9 s" Z) E' W7 V - and a user account (username + password) that has the permissions to do stuff
m7 D5 X! j% f' X - with the database. Additionally, you will need a vendor library installed on the
: g2 U% P# H4 }8 E/ a - local machine, this came with my MySQL install.9 ^4 e# j- m1 G1 u7 O5 A
- These instructions will not tell you how you might transfer your data from the
6 M+ s4 B: v& d - SQLite database to the MySQL database, we start with a clean and empty MySQL$ N5 T' j, Q2 w. c2 a' w! s9 M6 e% Z
- database.: V C8 t, T) R
- Some users have reported ways to import a SQLite database into MySQL, but at
6 N1 `1 D8 {# N- B& t - the time of writing, there are still too many issues - check the current status! U3 a& W5 @& q4 D6 l; Z( L; C
- in the TeamSpeak forums if you are interested.9 Q5 i' \" V* A$ I; g
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ R! L: ^ P3 i" p
- Borland was used. This driver can only interface with the client library that
' c; R. e Z6 X% n- V$ {/ e - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% h5 Z ]9 V) k! m: x( @7 B& f - client library - basically all you have to do is to use a 3.x client library as
[6 a; x! ~/ z4 K: h - "VendorLib" and a 4.x database to connect to.0 y' M0 F5 W9 w/ g) w8 m
- If you need more info about dbExpress, you can contact Borland.
1 F3 f% t8 f& t, _+ ~7 U8 r8 T, W - . b" z3 c- l/ M" X: Z6 c$ S
- ### Doing the work ###
: Q; Q; X$ z7 E1 C8 D - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 C( A7 @9 ?: b) h
- the perquisites right, just open your server.ini file, and add this section at' h, Y. P- c- U/ W# _
- the end:
2 y+ Y- b: s+ Y- T w; C - ---cut here---& @; c! _ v( S! v2 u9 m' {6 E
- [DBEXPRESS]
. L0 s! p+ }: M$ a y - sqldir=mysql_sql
# W6 B6 {, y& Y( j+ J, u - Drivername=mysql, J) s2 p$ i0 s6 L- Q$ [6 W+ {# s" h2 ?
- Database=Your_Database_Name_Here
( E6 H+ l3 X% F# H" x - Hostname=The_PC_the_MySQL-Server_is_on' a* `* k) h1 B' A: ^
- User_name=User_name_on_the_MySQL-Server8 ~" T Z( g7 c4 _! r, C
- Password=Password_to_go_with_above_user_name% P% m W5 K& _: j" r1 w# \0 \
- GetDriverFunc=getSQLDriverMYSQL
4 b U, r$ M8 w' H4 t) W - VendorLib=path_pointing_at_your_mysql_vendor_lib L( ?. d1 |" K: I4 u6 M9 B* A
- LibraryName=path_to_libsqlmy_libary3 ?0 _# Z6 b, m8 E- n+ C
- Active=1
/ }; i0 J1 s4 D& p8 n8 U% d - ---cut here---
$ J" M e8 w1 w' _2 D - In my environment (a linux box with a MySQL server running locally) I have:
. ^1 S+ f6 v3 P2 b6 E$ v - ---example---
* B0 M! G0 S/ ^0 ]: @5 V - [DBEXPRESS]/ a1 Y6 n% {2 c9 v3 Q& Z- o* y7 T
- sqldir=mysql_sql) Y. e& Q" r1 ]' R6 E9 y
- Drivername=mysql
' A2 S/ H9 ~% y2 U3 r+ [ - Database=test6 T, A2 f( u6 q
- Hostname=localhost
! e0 x0 D' [: ^ - User_name=testuser
; l6 Z( N8 L! M) G1 p7 J/ { - Password=my_password
, U! V) }6 t" G1 r& C6 d$ M - GetDriverFunc=getSQLDriverMYSQL
! r$ o# c* N% V, o - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
% Z2 T% Y8 J" n9 A& s - LibraryName=./libsqlmy.so7 m5 g: k5 B! O8 R9 M
- Active=1; L1 [: \1 q* L5 C2 G$ i
- ---example---7 r; a% k1 j' @2 Y, | F4 X
- . ^4 h6 a1 `5 `
- On a windows box, also running the MySQL server locally, it would be:& u9 h* e; B3 J0 {7 q5 F9 a
- ---example---. u5 R, }" n0 F7 ?3 _2 n( t3 \
- [DBEXPRESS]
8 b- v/ |$ d6 H6 I( E) Y' k - sqldir=mysql_sql! I* U9 i3 g( L( f3 `9 D
- Drivername=mysql$ F$ l o- s1 s$ E8 D* r# ^; R0 }
- Database=test* `0 A! c3 ?: s
- Hostname=127.0.0.1
; Z! L8 T3 @' q* T& Y - User_name=testuser
) m( O7 r7 y. U - Password=my_password* {! U& | |2 G, A6 {9 V) P
- GetDriverFunc=getSQLDriverMYSQL% h2 d8 J9 d: j' s5 [7 Y
- VendorLib=libmysql.dll
4 x1 Z0 ^$ Z& O1 P2 d) W7 o3 n - LibraryName=dbexpmysql.dll
9 Y! C% d) [$ Z" r - Active=1
, L8 K" L5 v8 I) f* n5 e - ---example----
0 ~+ a4 d- e3 t4 S1 H; B% i6 K - - written 02.03.04 by pwk.linuxfan
' E# q8 Y, E; K7 F* b# B3 ?* s
. h* S: B8 C) I1 k
复制代码 |
|