|
|
麻烦翻译一下,下面这段文章:xhan m4 q' V2 w7 ]! A# [( v
7 ^& w$ Y2 p6 _% M; W9 b2 X8 X
-
( A: t# f4 e, o( _2 | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 r0 p+ [( k6 P, H' Q+ w
- . x5 o, H3 u1 f' a3 D# F- F. D& N; J
- ### What we need ###' j8 U4 b2 P! K
- Naturally, we will need a MySQL server to store the data for us, this document 8 A/ s% a5 O O: t9 [
- will not explain how this can be done - there are documents out there for the
) M( N$ x* |/ I! l7 D! r7 `5 X7 {- m, ]7 k - interested. The requirements include a (empty) database for TeamSpeak to use
% i5 _& C" V. B% N- L- M8 ? - and a user account (username + password) that has the permissions to do stuff$ l. p0 l; k. ~) A6 c
- with the database. Additionally, you will need a vendor library installed on the
& x" u. Z# Y! k. p/ c( C. P5 ^0 Q$ [ - local machine, this came with my MySQL install.
2 l9 ]5 {6 S7 o - These instructions will not tell you how you might transfer your data from the V) q1 _% G0 B1 b7 ^
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 P, O, Q, D |5 g - database./ h, T7 }; Z/ ?, k( ]1 P( t2 S0 S
- Some users have reported ways to import a SQLite database into MySQL, but at
! j3 I& ~/ @7 `0 I - the time of writing, there are still too many issues - check the current status
9 t/ r" b5 B) G9 F: p# \ - in the TeamSpeak forums if you are interested.
3 _$ G* {8 B' O/ { - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- y4 D2 ^" x: p - Borland was used. This driver can only interface with the client library that
$ e+ l0 P# c0 H ?8 v - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this e! j2 g; x @9 G* L, M" Q& j$ D
- client library - basically all you have to do is to use a 3.x client library as
1 W, x$ F5 d# a. j/ U6 l5 I - "VendorLib" and a 4.x database to connect to.
: L: M" l$ P. c: t3 b A9 ^ - If you need more info about dbExpress, you can contact Borland.& h& ^3 s" [2 W) V' T. V, z" ^! C
- ! ]# {; x( v" m8 R
- ### Doing the work ###+ n3 H5 g+ }8 ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 J6 ?- k, {6 m6 A2 X4 O0 y( U - the perquisites right, just open your server.ini file, and add this section at
) r( U1 O$ t7 n H- X. M$ } g - the end:1 j5 y3 T) k) |! _
- ---cut here---
n3 A& B* h$ ?/ \/ ]! e% a* i - [DBEXPRESS]* j. _3 B( l! n1 C9 k3 f1 {3 n
- sqldir=mysql_sql F- o: G4 J" K; o# u5 A& j
- Drivername=mysql! j$ K' b3 z) U' L0 Y; {- k/ }
- Database=Your_Database_Name_Here
4 G7 P1 V" m+ S$ H) n - Hostname=The_PC_the_MySQL-Server_is_on# } ^% z0 c1 d9 J$ W( `9 I; X
- User_name=User_name_on_the_MySQL-Server
2 U6 j* L# ?8 Z7 y - Password=Password_to_go_with_above_user_name
w+ I9 O7 n( O0 |" G" X; K, @5 U; ~ - GetDriverFunc=getSQLDriverMYSQL/ f! S |! {5 g! e. r
- VendorLib=path_pointing_at_your_mysql_vendor_lib. I* O3 @" c. W/ p
- LibraryName=path_to_libsqlmy_libary; I5 q: ~8 n, e! E u
- Active=1
" W+ v* a, a! W: q, {- \$ W( ^ - ---cut here---
$ k& P5 f& B- ?3 I - In my environment (a linux box with a MySQL server running locally) I have:
: Q( ^( J4 n/ f# P. {2 @ - ---example--- w5 G" O; ]' y! {- f* u8 s
- [DBEXPRESS]
' r, T8 x2 z8 \ - sqldir=mysql_sql2 k8 v0 ]1 W: R+ z6 p( e6 A G
- Drivername=mysql% q1 r4 a( L$ Z/ o |6 }! W, B
- Database=test/ ^7 @) x3 a# H; A, j
- Hostname=localhost
( X! r' o* i! t: u - User_name=testuser: T9 C" f z6 v3 e* M
- Password=my_password7 U1 X, P5 X" k7 I! a$ r ]% n
- GetDriverFunc=getSQLDriverMYSQL+ w( B8 Q9 q, N' L J! Q G
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- f+ ?4 G: d* G1 X - LibraryName=./libsqlmy.so
( ?3 Q6 H$ I5 k) l# k - Active=1
% j/ g) L6 {+ [# Y" [: W - ---example---+ n! x* U. ^0 }
- / }9 \, E5 x- X+ O# Z: P
- On a windows box, also running the MySQL server locally, it would be:7 x& |5 {/ w/ e8 B
- ---example---+ X- n) ?. N f& d1 M% h
- [DBEXPRESS]
; ^3 Y1 `$ G, n& y3 s - sqldir=mysql_sql
; n+ R0 ?$ x7 [) V% J - Drivername=mysql0 C2 {4 d8 U) {4 U& ]; ]
- Database=test9 h9 w* v# N7 t( z3 ]* R( `
- Hostname=127.0.0.1% U, a# {& L( P* b9 q, X
- User_name=testuser
5 p1 _. v( j" A" z - Password=my_password
# J: M* M- f( k; @ - GetDriverFunc=getSQLDriverMYSQL/ F1 U0 a# k5 d9 J
- VendorLib=libmysql.dll. _2 p& ^* x) V. r8 R/ f9 p
- LibraryName=dbexpmysql.dll
! f9 k( A9 y1 j& z( j7 D% e - Active=1) A* `3 i5 T" h1 Y' x. [' `. `( V& x
- ---example----1 @% K8 g3 y4 P2 n4 m. R" L; y+ U1 k
- - written 02.03.04 by pwk.linuxfan$ g) s7 {8 T6 j1 F
- ( P2 C! r0 F4 C5 j+ p
复制代码 |
|