|
|
麻烦翻译一下,下面这段文章:xhan % }, g) b& L: r+ v3 l- Q/ T/ D
/ l% }7 M/ R+ m n% F- 4 F( q9 `3 |. A% a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& t" Z% V$ I, P( ?" n) R% S0 ? - ( i5 Y0 r; `/ P( \5 ?
- ### What we need ###% a+ i! @/ |8 S
- Naturally, we will need a MySQL server to store the data for us, this document
5 m- [( l, n" E* P6 I7 w1 V - will not explain how this can be done - there are documents out there for the
+ D; {6 l- F* m7 B5 Y3 c n - interested. The requirements include a (empty) database for TeamSpeak to use$ e9 F! J3 i5 |, [! ?( K; H8 T
- and a user account (username + password) that has the permissions to do stuff
2 P( i6 I y2 v/ { - with the database. Additionally, you will need a vendor library installed on the
$ U5 k/ V9 c: R) T k5 l! A - local machine, this came with my MySQL install.
) e$ {7 i i- H - These instructions will not tell you how you might transfer your data from the
/ Q8 s* t- }6 K3 H5 D& J$ I" G, F - SQLite database to the MySQL database, we start with a clean and empty MySQL. K6 g& Y% Y0 x- a, A& o$ J
- database.
! d) R( \9 b7 Z: r6 F, d5 Z - Some users have reported ways to import a SQLite database into MySQL, but at
: l7 f- e, `- c1 } - the time of writing, there are still too many issues - check the current status
( y5 \; G' L$ k3 A; D D9 M - in the TeamSpeak forums if you are interested.
* A. R8 u1 |4 p' Z4 E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- M. c) Z2 N6 m. ^7 r2 z& g - Borland was used. This driver can only interface with the client library that
5 u" |. f4 y4 I1 Q - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# L5 F* T( ~/ I$ ?5 o Y
- client library - basically all you have to do is to use a 3.x client library as 7 m1 h' K) }9 |
- "VendorLib" and a 4.x database to connect to.
1 E" |( n* `5 }7 o6 `) E - If you need more info about dbExpress, you can contact Borland.* j: n& C1 T9 b4 z$ b/ Z1 H
/ ~! f3 V. V( G. K- ### Doing the work ###9 Z2 X. C: _9 B) @" M; c7 a( T
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& \" i; i* w# ~# k, b( p; o0 U+ V2 y - the perquisites right, just open your server.ini file, and add this section at
4 l$ L% J2 H* s1 f z - the end:& } a0 ^' Y- M* Q ?
- ---cut here---
. K+ k, f5 M2 F - [DBEXPRESS] B) }/ J% i2 i/ ]! \4 u7 w9 ]
- sqldir=mysql_sql$ `1 e2 J0 J! j8 |- N
- Drivername=mysql4 T) W5 V! G, \- @
- Database=Your_Database_Name_Here
9 ?4 u$ e& R( O; _- b1 v; q0 w - Hostname=The_PC_the_MySQL-Server_is_on
- ~8 d F- A; G) o C' V. F - User_name=User_name_on_the_MySQL-Server( K+ j5 F$ S; \
- Password=Password_to_go_with_above_user_name
& T3 _2 p5 m; M) t - GetDriverFunc=getSQLDriverMYSQL
, S( G: i* N, S - VendorLib=path_pointing_at_your_mysql_vendor_lib1 L( T0 }6 t7 }) [+ ~
- LibraryName=path_to_libsqlmy_libary# ]+ J( u8 `6 ^# v) d
- Active=1
6 [& d" N9 u s0 D% e0 I( I" x - ---cut here---
" H9 o9 R6 M% i$ h" P- E - In my environment (a linux box with a MySQL server running locally) I have:/ X4 {1 v, g8 H, ?& j
- ---example---6 r7 H: z, e+ U- M: ^
- [DBEXPRESS]# W. V- M" d! T5 T& X
- sqldir=mysql_sql
$ [* @$ b n4 U8 f7 q4 z- x - Drivername=mysql
/ l0 Z1 @8 j- }0 ^" L N* H - Database=test
( b/ Z. ~5 y! W - Hostname=localhost
& G1 z' d# N- P( S% L7 v! ~ - User_name=testuser) F* Z( U- ^: r+ z9 k5 u
- Password=my_password
! j/ {0 G1 H3 g8 E6 s; J+ d3 u* U - GetDriverFunc=getSQLDriverMYSQL
5 Z/ B5 q5 @5 i ~ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ p# b6 c! R9 @ - LibraryName=./libsqlmy.so8 {- E0 j7 G( z% G0 y
- Active=1: a: p8 D+ _9 E! X1 `. b8 s
- ---example---
: w' V% O: r4 r - % W; L+ z6 W/ u- t2 ]$ |# E
- On a windows box, also running the MySQL server locally, it would be:
# x6 D9 @* \% @% Q9 u* R - ---example---
2 }; `( s- S; u' s. } - [DBEXPRESS]% Z: u/ L; G' J- P- h. I# X
- sqldir=mysql_sql
* B3 \5 u$ g( f \ - Drivername=mysql( v1 g/ u7 ]" _
- Database=test* [( l. ^0 p) n/ \
- Hostname=127.0.0.1
2 L2 A* [5 x2 C) A - User_name=testuser
" n( \( x1 w( j - Password=my_password
: @* ~) u$ l" n - GetDriverFunc=getSQLDriverMYSQL9 s" y4 ?+ N" U* N, F. a; v% R
- VendorLib=libmysql.dll
% W6 m3 p" H7 H/ W% t: c - LibraryName=dbexpmysql.dll- J3 J, R. \; y7 B" r, t
- Active=1
9 Y( s0 N2 E2 U! Y0 j" i6 w; M' R - ---example----
3 |$ T5 ?5 q7 q$ J& {! A: ~ - - written 02.03.04 by pwk.linuxfan
: A8 J( y5 ?6 h. [6 v. } - - @3 U% w% v, I/ A
复制代码 |
|