|
|
麻烦翻译一下,下面这段文章:xhan 8 e& s9 F/ q+ g6 n. P0 ]
" M+ |; C% z. |9 q" c- 6 @5 Y$ a( `# ]2 l5 b' y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( _3 Y& P6 }1 b8 m6 S, E# U A
' r; a( ?5 G' k/ `6 k- ### What we need ### X# D! F$ E8 u; Q. _0 V6 J5 J
- Naturally, we will need a MySQL server to store the data for us, this document 9 T: c o6 S# w% {
- will not explain how this can be done - there are documents out there for the
$ g7 S+ ~' k# d* m3 X - interested. The requirements include a (empty) database for TeamSpeak to use
( U" W' n* q" Q# G1 R - and a user account (username + password) that has the permissions to do stuff
- a; Y" `* V) b3 m( ]9 L/ F; n+ ? - with the database. Additionally, you will need a vendor library installed on the) h+ m5 |$ T, r4 ?' u9 X
- local machine, this came with my MySQL install.! j$ l& H! r$ Y8 U" w& z/ |
- These instructions will not tell you how you might transfer your data from the* {+ c2 p' {2 H
- SQLite database to the MySQL database, we start with a clean and empty MySQL
3 E1 j9 N+ c/ I - database.
1 u3 A8 q' @2 V0 `1 {% q0 c - Some users have reported ways to import a SQLite database into MySQL, but at
) d9 p% j! c) W2 V - the time of writing, there are still too many issues - check the current status
1 L2 Z# W$ u: U! K3 x' S: i - in the TeamSpeak forums if you are interested.. Y# A/ |' h6 Y
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from' d6 |, }# L q2 a j
- Borland was used. This driver can only interface with the client library that
" R: Y* ^ {9 _- Z; v - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 G. V! @: O' e - client library - basically all you have to do is to use a 3.x client library as : f2 I% a" A: `0 ^* G
- "VendorLib" and a 4.x database to connect to.
8 A- W! |% i+ a$ I( I$ f7 P - If you need more info about dbExpress, you can contact Borland.8 o) d- X* Q7 _* p) I
- 6 v ?9 o6 J& y0 \: y! q
- ### Doing the work ###& H8 ~" [3 M; s) @+ f
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 B$ @5 t9 I: Q6 l% o! F7 v+ ? - the perquisites right, just open your server.ini file, and add this section at+ C% b( P, ~ H2 Z( d) x- w$ u& f
- the end:
( P+ f# @/ R0 r+ q9 {/ a S1 q - ---cut here---% l7 L. J, y h2 O9 x
- [DBEXPRESS]
& a0 Q0 w- V: j - sqldir=mysql_sql
2 \! R. j3 X$ W5 {9 C3 _3 Q/ F - Drivername=mysql
+ z# g1 S V! l1 n/ _ B - Database=Your_Database_Name_Here
$ X* `7 K8 `; I' [ - Hostname=The_PC_the_MySQL-Server_is_on
# ~* b$ b" W/ S* r' Z$ U# c- A& j( z - User_name=User_name_on_the_MySQL-Server% t( ?/ h! Z& F0 R
- Password=Password_to_go_with_above_user_name5 X: X8 `% v6 N
- GetDriverFunc=getSQLDriverMYSQL
i5 C: |% [+ f2 J - VendorLib=path_pointing_at_your_mysql_vendor_lib4 V9 [3 o6 w- ~, w
- LibraryName=path_to_libsqlmy_libary& }& W8 b5 t9 h% s
- Active=1! _5 t G( O: T" U
- ---cut here---
8 W9 G. J# C2 T) a - In my environment (a linux box with a MySQL server running locally) I have:
6 ` N& b" K1 [/ a. l - ---example---
/ z6 N5 F) l, r8 \$ X, o' I1 c - [DBEXPRESS]) q0 \6 m7 ~4 n( I0 M" s
- sqldir=mysql_sql
, M2 o' w3 W; X A3 f2 ~ - Drivername=mysql7 g2 q# q9 K! \* Z# P# G
- Database=test$ t& E [1 m3 o$ z+ ^
- Hostname=localhost6 e8 f- Y- Z2 o* f4 v
- User_name=testuser& a) Q! ?. G/ I
- Password=my_password
3 g' ^. X* m5 Z. J. s1 @ - GetDriverFunc=getSQLDriverMYSQL8 }4 m7 {+ o6 c0 p3 Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ \+ }4 Q' a, J8 s8 y0 f& S - LibraryName=./libsqlmy.so. G. ^& V2 P& {8 [" m" }: y4 x. E
- Active=1
" b- O2 h/ g2 g9 p - ---example---
" A4 o) a0 a# M7 w. T! O. } - 3 V% I: z$ b7 h D* ]
- On a windows box, also running the MySQL server locally, it would be:
: v' F7 [* ~8 [9 y) o" D) e - ---example---
; Y: G. f6 {- S- S. y$ _0 A - [DBEXPRESS]
5 \* M6 z; m0 j6 g6 U- S6 ]. b - sqldir=mysql_sql
) s6 ?- |* q$ z - Drivername=mysql# U" L0 Q! l9 b+ M8 K
- Database=test
6 c/ u) H' N4 I' z6 Q - Hostname=127.0.0.1
+ {7 J9 k5 h' f( l - User_name=testuser
. t0 h6 Z2 H) B* K3 m5 C - Password=my_password
4 [% M w1 }2 O0 n7 u& G - GetDriverFunc=getSQLDriverMYSQL7 O) I; X" X) U" g
- VendorLib=libmysql.dll! J8 ~- ?! Y0 B o
- LibraryName=dbexpmysql.dll% r+ @, K$ r; \, ^) ]7 r$ t
- Active=1
1 l, d, b! X! N9 _2 |" { - ---example----; ~5 S8 A7 s# p/ m5 Q# S
- - written 02.03.04 by pwk.linuxfan
7 C& z* L' B, S6 X8 a
* s. u' Z. k4 W
复制代码 |
|