|
|
麻烦翻译一下,下面这段文章:xhan
) }% z1 n# t* w7 R2 }# `9 V. i$ u, c" t; x5 Q: b3 v# T* U
-
$ ^8 N9 Z: i! [+ w! y6 k% l8 Z( A - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 s+ T8 a1 C- {0 l/ A F7 G T+ O
0 v/ I m* d, d. Y7 b7 ]- ### What we need ###0 L5 {; e' X% x7 g5 q e
- Naturally, we will need a MySQL server to store the data for us, this document ( u+ I) t# V3 w8 |( h
- will not explain how this can be done - there are documents out there for the
" `8 O6 D* b4 B. t - interested. The requirements include a (empty) database for TeamSpeak to use
) @9 @# u, J2 Y6 J5 J0 z - and a user account (username + password) that has the permissions to do stuff
! V* S- Z) A8 G - with the database. Additionally, you will need a vendor library installed on the7 d, j, i+ T; A1 }& X# X
- local machine, this came with my MySQL install.
/ s; y2 L% R( C" ? - These instructions will not tell you how you might transfer your data from the/ z2 o% W, q' m
- SQLite database to the MySQL database, we start with a clean and empty MySQL( k9 S4 b: h* u. s& I
- database.* d* {& p4 \( Z1 \/ o
- Some users have reported ways to import a SQLite database into MySQL, but at1 J+ E( K x$ z
- the time of writing, there are still too many issues - check the current status
P( ~( {) H$ D) i( P - in the TeamSpeak forums if you are interested.1 k' q# o S- ?/ \7 R
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 H: b }* G. {8 n - Borland was used. This driver can only interface with the client library that / y( N4 r7 s7 a! ~9 @2 h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( _ O: d& H' f% Q4 E+ _ - client library - basically all you have to do is to use a 3.x client library as
$ O, ^3 @, k1 m' l" F; S' f3 ^ - "VendorLib" and a 4.x database to connect to.
& J, Y, t5 _3 P- V! ] - If you need more info about dbExpress, you can contact Borland.
( e7 ~1 d( R4 r0 p& r5 a
* ]" m8 p6 [' \ c1 W# B: x, g- ### Doing the work ###+ T2 J8 ]. o! ?; `! I; h/ V
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ d. o& f6 x: r6 m3 O$ H - the perquisites right, just open your server.ini file, and add this section at
. S3 t9 }& n4 e# i - the end:
7 Y0 X; K/ I. s0 {9 _: O9 y9 Z - ---cut here---7 _6 U4 f) S) G. k+ D" M
- [DBEXPRESS]
; e, d7 P5 A" E' E+ g, j6 L- B - sqldir=mysql_sql6 ?, k& i5 r+ c: i2 i
- Drivername=mysql: P8 v. m' ]0 A5 ^* m
- Database=Your_Database_Name_Here
. E! x! k0 Z9 y& j Z" [ - Hostname=The_PC_the_MySQL-Server_is_on
& v' l; y/ d8 g4 `; Z - User_name=User_name_on_the_MySQL-Server
7 C! i/ B7 _1 I- o - Password=Password_to_go_with_above_user_name3 L, |0 w( \$ U/ V# Z/ }# ^; c/ G
- GetDriverFunc=getSQLDriverMYSQL
0 X* T2 ]+ H# A# T& Z# ^* ?& W. Z - VendorLib=path_pointing_at_your_mysql_vendor_lib3 h2 n* ]; z/ J$ C
- LibraryName=path_to_libsqlmy_libary
0 K7 {) D% V f0 q* Y6 l4 F2 o4 K& E5 ?2 U - Active=1
6 F! g/ g% A `: K! f: O4 W! Q - ---cut here---" e- [$ {2 |% P
- In my environment (a linux box with a MySQL server running locally) I have:
5 Y7 t! F8 j( m7 i$ C& z4 e" c- h - ---example---& {/ j7 `' e! b& e( |6 e7 K$ ^% a
- [DBEXPRESS]: w! z# i* ^1 j8 t& `
- sqldir=mysql_sql
8 b1 J# S. l0 o4 f4 Q1 p - Drivername=mysql
5 v7 L0 Q6 Y- A - Database=test
6 A* n1 d, ?. H - Hostname=localhost
$ z. a, K; F" X7 u* H: ^ - User_name=testuser! H9 G9 A8 M' [
- Password=my_password6 P3 ^1 E, k: z0 y n
- GetDriverFunc=getSQLDriverMYSQL
% H$ m' F3 h+ c - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 j1 D3 {8 P1 J3 s
- LibraryName=./libsqlmy.so
' R0 F2 m0 |" U3 v, H6 Y' w - Active=1
( a A, N- Z( ?) x8 T - ---example---! e1 O2 ]4 `) T
3 d" S$ }: B8 S6 S- On a windows box, also running the MySQL server locally, it would be:
, z; J2 W% j8 x9 H - ---example---
9 M& G# c m3 L - [DBEXPRESS]
6 a0 G6 @" t( w$ r8 E# H4 P7 Z - sqldir=mysql_sql- i o) x/ p" w* o0 S2 R% N
- Drivername=mysql b5 T# p. V K/ E3 D5 a/ y0 M
- Database=test
9 q6 w- c7 n+ t) _% h. f& R4 Q - Hostname=127.0.0.1
3 t1 E' E# ~$ n$ k( m* } - User_name=testuser
% A9 L1 k( @5 n8 B a - Password=my_password
9 e/ q7 G. x7 ~! L- e$ _" Q - GetDriverFunc=getSQLDriverMYSQL
$ ?% Q; k' v) u* A' } - VendorLib=libmysql.dll$ l3 P* U* H7 X7 q& f- p# a: a n
- LibraryName=dbexpmysql.dll
* x$ a+ `9 {2 D) B. K( z0 U - Active=1
. I- A& @$ o/ u# X+ B - ---example----8 E8 j5 j" T/ w: L/ A% ]; v5 |
- - written 02.03.04 by pwk.linuxfan+ O$ J+ V5 H+ |/ ?) T
- 7 _6 y- q" N- g4 w: n" X8 L
复制代码 |
|