|
|
麻烦翻译一下,下面这段文章:xhan # @! s# B$ g4 K( d( J) A7 Y
6 W9 @- F$ n0 G
-
- N& m9 _ }) P, c; s5 E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 \$ Y; d( \/ c% U" \* f' m6 p
- ; y" u7 Q; v! t' E8 f# U
- ### What we need ###0 r3 E$ |# ^* V/ h5 l) D/ A
- Naturally, we will need a MySQL server to store the data for us, this document
$ d6 v& o5 X( D7 Z# m) d - will not explain how this can be done - there are documents out there for the
4 x# T+ S; m; O - interested. The requirements include a (empty) database for TeamSpeak to use0 f) q$ Y L; i5 [/ i3 k" }
- and a user account (username + password) that has the permissions to do stuff4 F; P; ?! E m8 G ~1 O8 t
- with the database. Additionally, you will need a vendor library installed on the0 K7 D0 I! O0 y7 s; M* q ?
- local machine, this came with my MySQL install.: V2 e+ I- q" u! G6 k/ }
- These instructions will not tell you how you might transfer your data from the" W' l- ?. J1 S9 j4 S" k5 N
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. a0 s _" K& p/ \ v - database.
! R }5 ^7 s0 `; q9 D - Some users have reported ways to import a SQLite database into MySQL, but at) E, W8 U: d* i+ y% [% N
- the time of writing, there are still too many issues - check the current status3 { k0 ~$ @4 K; _% W5 f* _
- in the TeamSpeak forums if you are interested.
# n4 _1 m% D* d& H. x" T7 s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( b- c/ R$ r$ C' ?; { - Borland was used. This driver can only interface with the client library that + G% r0 D! ]; \) n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
}/ N% l S7 L) Q! v - client library - basically all you have to do is to use a 3.x client library as
( J2 `7 E4 n2 U- g9 q3 O - "VendorLib" and a 4.x database to connect to.6 P- t' f5 Z/ i6 Z$ i
- If you need more info about dbExpress, you can contact Borland.
) v, D# e8 F0 g* E0 Q! v2 `0 ?
$ ~* m6 @3 o, S- ### Doing the work ###- I6 m n, N1 p, ^
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 D- `! f2 C) k( n: j ? - the perquisites right, just open your server.ini file, and add this section at
; q. j1 [; K4 m5 m3 E - the end:
6 j& t6 h2 p5 v/ C" V2 ?' F" O6 | - ---cut here---
. V0 w1 Z$ l3 u9 u" I6 S - [DBEXPRESS]4 @( z! L- U R, W! n
- sqldir=mysql_sql4 j! ]7 U$ x" k! \. L& A
- Drivername=mysql
( R! R9 P+ N1 w5 {6 U - Database=Your_Database_Name_Here
* R% C! Y3 S6 Z( Y7 F - Hostname=The_PC_the_MySQL-Server_is_on
+ s! C0 _( z7 h2 K4 M6 K4 Q - User_name=User_name_on_the_MySQL-Server
; t' }/ [5 w0 [4 E - Password=Password_to_go_with_above_user_name+ |, @. w7 R, v) r: Z% Q
- GetDriverFunc=getSQLDriverMYSQL
& x5 u; P7 S1 G2 l g- e - VendorLib=path_pointing_at_your_mysql_vendor_lib
5 T) ^; y2 R/ ^0 E! u/ Z - LibraryName=path_to_libsqlmy_libary6 Y9 X' L! A: s
- Active=14 ]# c1 Z9 a0 x8 L3 ~
- ---cut here---7 i2 u' D- z: W% Q# a
- In my environment (a linux box with a MySQL server running locally) I have:
! r! c; \9 n( i7 Y4 u - ---example---
# A5 @" m( Q2 U# @( e8 { - [DBEXPRESS]$ h' H' k7 I& e# ~: N+ @
- sqldir=mysql_sql
1 q3 ?3 ^8 U+ X9 h) \/ ] r - Drivername=mysql2 Z6 V) j9 p2 I9 P9 Y5 H- @0 }6 D# ^
- Database=test6 t; r$ p2 A2 I: x; z9 _5 q
- Hostname=localhost
$ L, A- G9 X2 ?# d! N - User_name=testuser
- i. {+ M5 ^* l, Y7 E# N+ Y- Y - Password=my_password# s0 v/ h- c& @+ a* j. d
- GetDriverFunc=getSQLDriverMYSQL' d/ Y; N2 g p% q9 e- H
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ c/ K- M5 `- d' e5 l - LibraryName=./libsqlmy.so
; t6 i+ ^; `, t. t0 C9 `& e. N7 x* K - Active=10 D3 H, N4 s7 H
- ---example---6 e e4 W$ N% n. L- j
& S( M2 k- r8 y& ~! R- On a windows box, also running the MySQL server locally, it would be:& _ [6 G. f9 V: i, z
- ---example---6 I' {7 ]' A5 z6 n
- [DBEXPRESS]: V2 k# \+ E5 W9 o) I5 ]! D; j
- sqldir=mysql_sql
! w0 a+ G# x0 g* E - Drivername=mysql* @6 x$ \; {+ h6 A0 `; [
- Database=test/ b/ g/ r' |" c$ ]/ O
- Hostname=127.0.0.15 c1 C9 S2 e, v: K; m/ ~
- User_name=testuser+ O/ @6 R! G$ u! x3 N
- Password=my_password
# K( t% {, j- _3 [& _" a6 P - GetDriverFunc=getSQLDriverMYSQL
0 [; M) p$ R: }* D% [* _ X - VendorLib=libmysql.dll- _2 k' P; r+ V4 P9 w. F9 E
- LibraryName=dbexpmysql.dll
X( \" m r) F% f2 ~; E - Active=1
' l( Z G) \5 p' l7 [ - ---example----4 y+ o: }/ u9 N& T
- - written 02.03.04 by pwk.linuxfan
# Z0 G! J; r) O9 } ~: M
5 ?% r, B9 h. x( |" @
复制代码 |
|