|
|
麻烦翻译一下,下面这段文章:xhan 0 a& d& f9 T# ?4 g T' ]$ z/ l
1 |. q. b3 ^( _. U+ E5 P-
' M: Y: j( w- a: ?; k - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
$ P; h6 q9 U/ Z! t0 l4 `
2 C4 v& U" C1 ?5 ?& o- ### What we need ###% q& t, s; O+ `: k1 [8 Z1 X
- Naturally, we will need a MySQL server to store the data for us, this document 3 z) {4 H4 R, f7 x4 l& S* i. O
- will not explain how this can be done - there are documents out there for the
+ M4 W! M: }6 @" E2 X& J! n3 Q- T3 |6 F - interested. The requirements include a (empty) database for TeamSpeak to use8 P# D: U) e6 h( C
- and a user account (username + password) that has the permissions to do stuff2 Y* l3 ^) M( l$ d9 N+ Z
- with the database. Additionally, you will need a vendor library installed on the
$ t# N d. z* }- y$ K; u - local machine, this came with my MySQL install.
1 M# O3 F) ~; t i - These instructions will not tell you how you might transfer your data from the
1 p$ Y O: e: { p j3 g - SQLite database to the MySQL database, we start with a clean and empty MySQL3 e5 D5 a. ?( T- n
- database.
; f. i9 m* P0 i. {6 h' q4 _ - Some users have reported ways to import a SQLite database into MySQL, but at; q! [1 t$ D4 G5 R; @* T8 A
- the time of writing, there are still too many issues - check the current status
3 \" S" Q2 V3 O) Q, q( N9 y - in the TeamSpeak forums if you are interested.
7 {; G8 p$ T7 e. V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 n/ C! n! T* C9 H3 g& ?4 F1 \ - Borland was used. This driver can only interface with the client library that 8 n& o9 H! E( x4 C- ]. D1 j
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( K6 w7 Q A$ e - client library - basically all you have to do is to use a 3.x client library as 1 h$ j: F) D, {# b) K2 [2 V
- "VendorLib" and a 4.x database to connect to.* l( O( G U& J& I2 e; z) } y5 A
- If you need more info about dbExpress, you can contact Borland.
6 ]- n7 _6 U6 U3 X9 L
, ?2 q; g- |$ q! X2 w- ### Doing the work ###
) @) C" m: i4 f8 n1 h; }# u5 o2 G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 o H0 n8 H% x, i2 I
- the perquisites right, just open your server.ini file, and add this section at& [$ X+ P5 t c8 } D
- the end:/ J; Y u1 d7 _' {4 ^
- ---cut here---
* Y. c) ]5 G6 } - [DBEXPRESS]
6 G4 U* S# K1 T - sqldir=mysql_sql# \5 }, o& ^% X& c# v
- Drivername=mysql: t# x% e" k3 T4 d
- Database=Your_Database_Name_Here
1 ]( I0 `* H S `7 P+ @2 v5 M - Hostname=The_PC_the_MySQL-Server_is_on$ [# \3 x, U3 }9 i8 ?: t
- User_name=User_name_on_the_MySQL-Server7 q3 M% q$ p% X8 `1 B3 O l" y
- Password=Password_to_go_with_above_user_name& Y% s4 i/ R* E4 c$ l" d2 I
- GetDriverFunc=getSQLDriverMYSQL
2 K# ~0 x* i- |$ ~$ c1 w - VendorLib=path_pointing_at_your_mysql_vendor_lib
- S/ r+ P' s/ g8 z - LibraryName=path_to_libsqlmy_libary
' v$ h& O' [# V2 X+ ], Q" ~ - Active=1
5 |5 X2 r% S! Y/ T- A% Q - ---cut here---
: S+ e0 E% a4 F - In my environment (a linux box with a MySQL server running locally) I have:/ D5 @$ o/ S9 n1 b
- ---example---$ |. }( r* y" {! @! K. g' E
- [DBEXPRESS]
' F/ N) v# l& g. l. w - sqldir=mysql_sql1 ^/ a' G) f0 b% F# Y4 I) d Z3 h
- Drivername=mysql- x3 |2 j. O4 a9 U7 S! ]0 [# L
- Database=test
+ A& D4 t2 Q3 a4 k' U" I - Hostname=localhost5 G& r& \6 y% D6 G6 z; N+ T, ^" W
- User_name=testuser5 Z( P* z, w% Y9 \0 k
- Password=my_password; A2 A0 e- i6 i2 Z6 _' L
- GetDriverFunc=getSQLDriverMYSQL
: S- H: Q: q$ F( i* X6 K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
% Q N" _7 W4 i, s ]! p - LibraryName=./libsqlmy.so
9 Z4 W+ Y9 a4 j3 Y# S9 B& r - Active=1
8 K- e1 I+ l) F - ---example---; ^ E8 Q4 e+ K1 c; Z
' r( P1 B6 i% Q2 e* |/ B6 x7 V7 x8 [- On a windows box, also running the MySQL server locally, it would be:
+ E: q/ O, x/ K3 ] - ---example---" x+ Q- a. r; ~; E- g( M
- [DBEXPRESS]
; V, Q( u; Q9 ~- p) W - sqldir=mysql_sql
: [4 `( i. b1 a, o - Drivername=mysql" k% @- C$ l- W
- Database=test9 |8 _4 f+ w4 `. x! W- X
- Hostname=127.0.0.1* A5 t1 k8 ~$ I( n1 |' ?. J; G0 _
- User_name=testuser8 ^$ M+ M7 }/ O) f) o; g3 F; x
- Password=my_password
7 a4 t% F, j$ z2 _9 e3 a/ \ Y1 W - GetDriverFunc=getSQLDriverMYSQL& j" p8 h0 j5 r
- VendorLib=libmysql.dll
: X5 B3 L2 _: O: x - LibraryName=dbexpmysql.dll
/ V( o p' Y3 @3 T4 b/ ` - Active=1
2 G( L1 P5 d7 n( k" \7 ?$ b" [" U - ---example----
4 d" ]6 M ?+ r( s( I - - written 02.03.04 by pwk.linuxfan
: L/ N) ^. H9 ?" C
# Q+ s( X1 F& y% V
复制代码 |
|