|
|
麻烦翻译一下,下面这段文章:xhan * o! A- ?; Z" m, P _3 m8 k
* @8 ~& P& }# b* @
-
" B) U& [9 \$ C) Q, g7 x - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 |- e1 w# K6 h5 {# ?4 |. f
- " \ `/ ^* {& R6 q
- ### What we need #### A& ?( |6 m6 e: h
- Naturally, we will need a MySQL server to store the data for us, this document . \, r; M# q4 C& J1 P/ V/ ?
- will not explain how this can be done - there are documents out there for the 6 O, I# d6 w' h S, I
- interested. The requirements include a (empty) database for TeamSpeak to use
' i7 S7 J& x8 a7 Y - and a user account (username + password) that has the permissions to do stuff
) Q5 H5 h: _9 ` |" R0 @ - with the database. Additionally, you will need a vendor library installed on the
1 `/ h$ @. e/ O4 L2 y+ M - local machine, this came with my MySQL install.
( ]. ~6 Y: @/ J) q' d5 x) [ - These instructions will not tell you how you might transfer your data from the
! J* b! O( O8 \: ?& L# _( [ - SQLite database to the MySQL database, we start with a clean and empty MySQL$ v2 N- A4 k; @# w# L
- database.' h' E) e) t C/ F {; W
- Some users have reported ways to import a SQLite database into MySQL, but at
* k% @$ u, I5 P7 s8 _ - the time of writing, there are still too many issues - check the current status$ K' G" {. x% X3 n+ I
- in the TeamSpeak forums if you are interested.& g* P* @, C7 L2 m
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% H3 h; j. v* b$ {3 X' y* S; o - Borland was used. This driver can only interface with the client library that ' |) {$ u4 e \& @) z: p/ ~+ A. W
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this C! L- ~( |# C
- client library - basically all you have to do is to use a 3.x client library as ' j$ |0 j2 X9 d! p
- "VendorLib" and a 4.x database to connect to.
8 z! b( f2 l$ ^9 _ - If you need more info about dbExpress, you can contact Borland.
0 o6 k( z4 F6 y1 \- j: G
7 p- z& ~( P2 L9 Q/ a s- ### Doing the work ###
1 l4 _# n( g1 U9 [ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all1 i* D7 P" v+ i: n1 N) E
- the perquisites right, just open your server.ini file, and add this section at P- F) A0 r' k# m9 ?; c( u( Y# v
- the end:
2 u7 h! A' V4 F' R( `* b, [ - ---cut here--- p% o5 S8 V5 E# h5 H2 ~# w
- [DBEXPRESS]" j! O6 t2 f- \4 @5 ~$ N4 u
- sqldir=mysql_sql2 B$ X! V5 ?' ^! M
- Drivername=mysql9 n2 E* Y; w7 Q2 B
- Database=Your_Database_Name_Here
+ I, H5 p, I; `8 ]. u, U - Hostname=The_PC_the_MySQL-Server_is_on2 T9 A- k+ P3 Q& `2 q
- User_name=User_name_on_the_MySQL-Server
6 ^* `; I |: o) Z9 h) r P5 W - Password=Password_to_go_with_above_user_name
. @+ R+ H8 ?# `4 U - GetDriverFunc=getSQLDriverMYSQL
! Z' _7 e, f% {- @( H( |1 i K - VendorLib=path_pointing_at_your_mysql_vendor_lib
6 H- }5 |! o& p4 a) P - LibraryName=path_to_libsqlmy_libary
1 e$ S0 o: J5 T y+ ]# Q - Active=1
2 _/ q4 g5 Y1 X$ U - ---cut here--- R8 _# }' N; y1 l. [. J% z. ^
- In my environment (a linux box with a MySQL server running locally) I have:' a g1 I j- ?- _2 w. Q
- ---example---' d9 i, J9 ^" V0 t; s+ t% s
- [DBEXPRESS]
" }# |# F$ w2 ~0 N) Q z - sqldir=mysql_sql& z1 \! B6 X. W( w5 u H& w" H/ B
- Drivername=mysql
2 a2 n @7 j+ U0 I7 a, f9 A: F - Database=test
/ s% O7 }5 y& i; J; w4 U - Hostname=localhost
3 s2 x0 `) v( }0 V4 r8 Z$ U: J% @ - User_name=testuser' V- W7 w0 d: T Q
- Password=my_password
1 n) d0 N# t1 T0 f" |, X: _ - GetDriverFunc=getSQLDriverMYSQL% |* U) p' h0 i) F J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) i: A' V1 Y% V/ T$ h
- LibraryName=./libsqlmy.so u' m1 Z, [- ^0 n- l8 {' E
- Active=1
+ e( h% k3 ~! c$ S( ]4 c0 r+ F8 P - ---example---8 e8 G) r# l; R7 H/ r X
- ! B. A/ e* _2 I h- g/ R& s% E
- On a windows box, also running the MySQL server locally, it would be:% k q; K$ o9 i" j, [
- ---example--- r' i E( R. G Z& \8 }1 J4 B
- [DBEXPRESS]/ z( a- h2 n" u
- sqldir=mysql_sql
. G$ i4 L8 n6 ]( N- u1 k - Drivername=mysql
3 c0 b5 @ ?, G - Database=test# [' j& D) A8 |& ?1 c
- Hostname=127.0.0.1
4 A7 t! x/ Y2 b, p - User_name=testuser
0 h3 g" k( T1 e2 G* b - Password=my_password$ `4 d4 P5 B: m: }7 \! W2 S* z, M
- GetDriverFunc=getSQLDriverMYSQL8 u; L- m, a1 e; N7 a
- VendorLib=libmysql.dll, K& m% \; e* p0 y& e; t) o% f
- LibraryName=dbexpmysql.dll8 Q/ R; N8 c* a
- Active=1+ Q+ ^. ~1 h( a8 h1 x2 f! B5 t" m
- ---example----; l5 F' h# _3 i2 y5 W1 i0 L
- - written 02.03.04 by pwk.linuxfan( G0 b" Y! d; b1 h% I% g
# Z( `! d: k, B3 U7 m( P
复制代码 |
|