|
|
麻烦翻译一下,下面这段文章:xhan
: g) W$ c/ x) n: u: y3 k- r$ C# @
. Q! k8 H2 |1 }+ \6 x: g-
$ F. U5 A- c8 U, O- d - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; Q8 E; ]$ y; z' z& U$ x
' t; [6 M; y0 r6 K0 N4 k. K3 G- ### What we need ###1 E$ p. R% ]1 _7 i$ Z: [
- Naturally, we will need a MySQL server to store the data for us, this document 5 j$ O J5 n; D
- will not explain how this can be done - there are documents out there for the
. a% }; P4 c% l+ O8 x) l - interested. The requirements include a (empty) database for TeamSpeak to use9 ~- [% t, a2 f, V4 z" e) T
- and a user account (username + password) that has the permissions to do stuff
" _$ E+ C( I# x* S* E, x% B' W* R - with the database. Additionally, you will need a vendor library installed on the
$ m& l+ J. S7 i N( S( Q - local machine, this came with my MySQL install.7 b& \5 \0 ~/ K( e
- These instructions will not tell you how you might transfer your data from the- A: G+ w9 z+ q' y" h$ {
- SQLite database to the MySQL database, we start with a clean and empty MySQL
* o+ A5 L2 M' `+ e - database.8 L" [9 X: B4 b. X: Q% X- I' X. ?
- Some users have reported ways to import a SQLite database into MySQL, but at
8 z& s+ q9 a V - the time of writing, there are still too many issues - check the current status+ ]0 X' W9 q8 W8 Q G
- in the TeamSpeak forums if you are interested.
( t* J, ?: N) x - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ A) y4 N" h+ U" [ - Borland was used. This driver can only interface with the client library that
: C" _/ q/ Y+ H/ x4 {, K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 D9 u/ C$ r) q) z! B# A6 r$ Z3 r# S - client library - basically all you have to do is to use a 3.x client library as 7 h, z! I5 @$ ^+ O' {& p2 k: h, h
- "VendorLib" and a 4.x database to connect to.) [; @; e" F) H- T
- If you need more info about dbExpress, you can contact Borland.
1 V) s T; S1 T' n8 a# D9 u* V/ j
8 e7 z% i( Z/ R& U, U$ j" H; E- ### Doing the work ###! m8 d4 c! {2 Z8 a1 j& @
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all) X, b9 y; }+ T# u( g5 i; p- W
- the perquisites right, just open your server.ini file, and add this section at) P8 V# T( w2 V+ P" x j! ~
- the end:
& [' p- }& Q* k/ D - ---cut here---9 X9 T, A9 _* {8 T/ Z
- [DBEXPRESS]& E* i) G4 Y7 r( \1 D7 ^
- sqldir=mysql_sql
4 O; C% K! Y" \7 d4 Y9 J - Drivername=mysql1 d; K2 Q6 m7 Z! {2 }
- Database=Your_Database_Name_Here
" R0 T/ @6 O& B$ Z6 O - Hostname=The_PC_the_MySQL-Server_is_on( y. F1 O2 h4 h& J8 z) E9 g2 X v- l$ H( Q
- User_name=User_name_on_the_MySQL-Server v8 e: a( B" Q$ [& T$ Z% O: C
- Password=Password_to_go_with_above_user_name6 O2 l f5 D/ j3 F! N1 P
- GetDriverFunc=getSQLDriverMYSQL
( M* L6 j& {. Z: s6 B; x - VendorLib=path_pointing_at_your_mysql_vendor_lib
: F. `' T2 L5 u2 \& Z! d - LibraryName=path_to_libsqlmy_libary
4 G7 `+ C! _) h6 m) i [ - Active=1
5 B# { B2 z) a4 j7 p - ---cut here---( A4 r# T4 I4 o: |
- In my environment (a linux box with a MySQL server running locally) I have:9 E# c8 v" }- X) }6 C# R1 s
- ---example---6 n6 P _' r6 U2 K( t
- [DBEXPRESS]
5 y0 s5 H1 Q" I0 p+ M$ j - sqldir=mysql_sql( Y: y; A6 J1 d0 l4 r& u6 M
- Drivername=mysql" p/ @, i9 A$ W- Y$ a7 M( P
- Database=test- h/ E+ j0 y. C; T* b% @
- Hostname=localhost
5 U7 m+ Y3 E* l3 ^$ D8 b - User_name=testuser
$ q6 i4 \2 a6 }$ ] - Password=my_password; O: M* Q' ]" a5 @9 Y+ a2 f
- GetDriverFunc=getSQLDriverMYSQL( Q! u7 u6 D0 E/ M# M6 b+ Z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* o; n3 ]# j8 a, J. T7 g
- LibraryName=./libsqlmy.so0 m- m# m8 n# }7 |. ?
- Active=1
* a! ?# j O( _. C2 |! x7 b# c - ---example---
" k: F# J: B5 c* f4 L' Y2 @) }/ K2 ~: j
7 B% |$ S, Q, R1 _$ O- On a windows box, also running the MySQL server locally, it would be:
& j1 V$ }) }; u7 |' V0 U - ---example---* b7 w# y7 H4 f
- [DBEXPRESS]
: v" A/ }$ I# C/ ?* b - sqldir=mysql_sql
0 T3 i! o% b4 y! ~0 k9 [ - Drivername=mysql$ m: m$ C' u: h2 t4 \" g* j
- Database=test0 A. x) R8 e' c& U9 `0 a
- Hostname=127.0.0.1" P; t W, x+ b( P
- User_name=testuser
6 D* u9 g/ ?" [ - Password=my_password
9 G8 K: r, Y1 | - GetDriverFunc=getSQLDriverMYSQL8 R% ~ ?# h" R0 T* }$ {0 c0 w2 _
- VendorLib=libmysql.dll) u- s1 M1 z. O+ f7 E
- LibraryName=dbexpmysql.dll0 b H0 z3 f4 `, E0 C
- Active=1; \9 z6 F3 k9 V, F
- ---example----! n6 @7 c0 O( ]) j
- - written 02.03.04 by pwk.linuxfan
2 t% U+ K" ?8 [
; D0 }6 I' |( R) _) z
复制代码 |
|