|
|
麻烦翻译一下,下面这段文章:xhan
& e# G! o" f1 E
! P" P3 f! n/ I( u: U- J8 b7 { d: J# e6 A- v7 B
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; ?0 b$ E/ |* X1 F/ d' ^* K
- 8 s! f. v3 k* ?; V. b
- ### What we need ###
6 w! I o% S" m5 C - Naturally, we will need a MySQL server to store the data for us, this document
* ~- \- V& f: s5 ^; B - will not explain how this can be done - there are documents out there for the
% X. E( g$ X+ V' W$ o; j( [ - interested. The requirements include a (empty) database for TeamSpeak to use
; {: J1 ~$ Z) p. P - and a user account (username + password) that has the permissions to do stuff1 G" e3 Z& W/ x9 r9 [
- with the database. Additionally, you will need a vendor library installed on the
) d0 N3 V( T7 \1 S5 W1 _ - local machine, this came with my MySQL install.7 d& z% w4 l6 h# @1 [3 J y
- These instructions will not tell you how you might transfer your data from the# m% o4 C$ i9 M: E( T, A: `
- SQLite database to the MySQL database, we start with a clean and empty MySQL* J1 ^1 x+ S% w( R" @' a8 u
- database.* I! h/ Z9 m$ U2 f4 {2 r
- Some users have reported ways to import a SQLite database into MySQL, but at$ }( `3 C' B2 b5 y. O2 o' W
- the time of writing, there are still too many issues - check the current status. F/ F# a- A' v8 B
- in the TeamSpeak forums if you are interested.+ I' v: F3 O! c- W$ l
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! o- Y6 Q4 y! E" O. {! C+ {" J - Borland was used. This driver can only interface with the client library that . g# v+ ^" ]' t8 d0 }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" r, x3 S) q/ ~
- client library - basically all you have to do is to use a 3.x client library as 6 |( c# M) ^; F
- "VendorLib" and a 4.x database to connect to.
9 q# w5 w1 j! Z, U7 Z4 p - If you need more info about dbExpress, you can contact Borland.
- P! z' v; B. Y5 i) C {/ U2 G" v
{( a6 l* O: }# q7 N6 ^* K0 x- ### Doing the work ###) c; W" I% t9 A4 Y& l1 s
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
n$ i5 z7 n% w |" F - the perquisites right, just open your server.ini file, and add this section at, _' P7 i8 a* ^) p" @, U
- the end:
) C) m6 @' D) M: D6 |6 o - ---cut here---* Z: H0 J2 ?6 d, }& {. f/ y) I
- [DBEXPRESS]
6 \" O2 W s( }6 D2 O3 l - sqldir=mysql_sql S! D- m+ x' I& {
- Drivername=mysql5 W; h. O# h- Q1 t! @2 K5 X3 K
- Database=Your_Database_Name_Here
# Z% |: B2 j) Q2 ]2 W - Hostname=The_PC_the_MySQL-Server_is_on
$ T9 R" l0 q; q7 C% H0 S - User_name=User_name_on_the_MySQL-Server6 C z- `3 v8 S( W
- Password=Password_to_go_with_above_user_name
3 M2 O5 s5 Z5 A- T v - GetDriverFunc=getSQLDriverMYSQL
5 A- i2 A6 c4 U' D0 J - VendorLib=path_pointing_at_your_mysql_vendor_lib
0 o, @+ Y, ], y0 L5 V5 `. l1 q - LibraryName=path_to_libsqlmy_libary
" F4 S s; l" Y - Active=1
% l5 R5 X2 l6 I3 T - ---cut here---
: T) Z* n9 P3 b - In my environment (a linux box with a MySQL server running locally) I have:3 S1 D* f ?8 s3 X1 F. y
- ---example---
) v4 W: L2 [4 i$ }; |! x+ b - [DBEXPRESS]( [5 t; F( h8 ?* ]
- sqldir=mysql_sql, e4 r" {9 W; K8 P- U9 U7 g& H
- Drivername=mysql k& {( v9 {, r6 `9 q; i, U
- Database=test
/ a3 F( }8 P3 ? - Hostname=localhost2 c& v* V! S' V. `4 z
- User_name=testuser) f6 y+ b0 Z- w1 X# d
- Password=my_password: Z+ \% J" a, j
- GetDriverFunc=getSQLDriverMYSQL
$ t0 ^% Y& I/ t/ V* k; o) w! ], j4 x - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 |0 Z7 Z1 }& z1 r
- LibraryName=./libsqlmy.so
$ E0 c2 i& {# \+ r4 ~ - Active=1. _: f; @' j) z2 n g/ s
- ---example---
* c- f8 j/ F6 N
) c' _5 ]. O9 g" t; y- z- On a windows box, also running the MySQL server locally, it would be:# V" r& C+ G8 `
- ---example---
& b! I+ H. a5 w+ U7 d: i( @ - [DBEXPRESS]
& E) [% E( V z4 _; P - sqldir=mysql_sql% S: P& G* d7 S! J- L* a1 y; x) J D2 ^# E
- Drivername=mysql+ f0 q$ y% d) w x: _* [" e
- Database=test
. c6 s4 w! A0 t# V& y8 _ - Hostname=127.0.0.1; B q* \* }1 R# P9 X# j% `
- User_name=testuser3 ]1 Q+ ]# A0 z: ]( x' ]
- Password=my_password
( B0 I* K( x" `+ y6 ^2 \- |3 W* ^' b - GetDriverFunc=getSQLDriverMYSQL, c/ u( } \' J% m2 k3 h
- VendorLib=libmysql.dll8 C. ?) ^1 Y, m
- LibraryName=dbexpmysql.dll; W3 I$ E7 K5 c) b- D
- Active=1+ Z" ?- [2 F7 b/ _0 m [
- ---example----+ O& m" c$ _; [% J) U! E
- - written 02.03.04 by pwk.linuxfan2 c6 T+ L2 t3 }. I
- 1 d$ k& H8 Y7 I2 K( Z& e0 Z
复制代码 |
|