|
|
麻烦翻译一下,下面这段文章:xhan ; \7 j9 }# I+ c+ D. c) f
; O" X0 [) E- J- A% l5 u( Z2 m- ( N- T- Z; c6 Q, u
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; i0 y- x1 {6 E8 C1 D+ c" g
8 p) P: u! s) X, y- ~+ Q- ### What we need ###
1 _9 i6 S4 ?8 g8 l9 R! c5 Z" q! Z - Naturally, we will need a MySQL server to store the data for us, this document
2 g, y% [! ]) I6 }% l) {4 {; R - will not explain how this can be done - there are documents out there for the & [3 O: U! y& t7 x) s6 m: O
- interested. The requirements include a (empty) database for TeamSpeak to use6 x5 U% d: u; I/ T3 ]5 Z
- and a user account (username + password) that has the permissions to do stuff
- B* ?" {4 h. n) ^) n - with the database. Additionally, you will need a vendor library installed on the
0 g: C6 c& X4 T3 T/ ?1 T# M - local machine, this came with my MySQL install.1 n& K0 V6 q `9 b. D6 b4 H
- These instructions will not tell you how you might transfer your data from the
2 k1 u+ v: n" a0 P: v- U: t$ W - SQLite database to the MySQL database, we start with a clean and empty MySQL% d2 N% e3 k% z# V
- database.4 a' [$ `9 ]' N% W4 h
- Some users have reported ways to import a SQLite database into MySQL, but at
( K5 r( p4 O2 }& y3 S7 ?! M" ^6 M; } - the time of writing, there are still too many issues - check the current status
5 W2 S8 @* e8 Y! j+ ` - in the TeamSpeak forums if you are interested.
5 i: b4 H! t% |, @8 K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 L5 }7 M4 x4 S
- Borland was used. This driver can only interface with the client library that
2 k, U4 E% O3 Q. N8 K4 V+ v - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 P6 T2 H( S# S" }5 {1 V - client library - basically all you have to do is to use a 3.x client library as * \+ V. a* _. [5 d: q* X
- "VendorLib" and a 4.x database to connect to.
, A3 O, G! ^- f8 p5 s c - If you need more info about dbExpress, you can contact Borland.- m* R6 T5 ^) j' T) E9 l, [
' c2 W# @: {+ ?- ### Doing the work ### R' Y3 {1 y" b N
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 D- ^" S) G j# ^5 E - the perquisites right, just open your server.ini file, and add this section at5 t) u2 n" A- Q
- the end:
6 E7 f- x: c# V# X3 Z& n - ---cut here---6 O/ g2 E& K9 l& p, V
- [DBEXPRESS]
- y) K1 S+ p0 _" a* w4 P - sqldir=mysql_sql6 u6 [5 R$ w* k; x6 a' ]
- Drivername=mysql I6 D8 a c2 H: W. j
- Database=Your_Database_Name_Here
1 P3 c, _! }, r5 |& c* S4 q' ? - Hostname=The_PC_the_MySQL-Server_is_on
& F8 G' f! D: X3 p( m - User_name=User_name_on_the_MySQL-Server& z! b8 l9 y# i* y
- Password=Password_to_go_with_above_user_name9 R, ?5 m# c, m2 U: b
- GetDriverFunc=getSQLDriverMYSQL6 N& L7 f% Q' I, V) d* @9 ^# L) z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ {# L7 E; C3 o, D- K' I - LibraryName=path_to_libsqlmy_libary
, r4 _3 Z) B; \8 x- e - Active=1
) d/ F- C; {3 ?3 h* y; B1 }, Y, O! Z - ---cut here---" k' F( x0 f; f! p% v
- In my environment (a linux box with a MySQL server running locally) I have:
( K* ^0 F( j' n: L; H - ---example---
6 z. Q8 z3 e/ m" Z) H3 L - [DBEXPRESS]
& i5 e$ ^8 ^$ x - sqldir=mysql_sql5 k9 M8 ^( y' X1 l) i2 G
- Drivername=mysql
1 l( {2 y( `1 ?0 n - Database=test
1 v, A2 ]# [& i8 p5 M' P0 { - Hostname=localhost5 ^3 Q4 z4 j- O4 }
- User_name=testuser8 \' H ~5 T9 d4 w* b3 J
- Password=my_password
3 R3 N5 ~5 q6 F; n9 E% U" u$ T - GetDriverFunc=getSQLDriverMYSQL
/ {2 {: \ s7 T% {& n0 i, B( u - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, w Z" j: P9 t' M; r - LibraryName=./libsqlmy.so2 f6 i& W9 ~ C7 |, ]/ O( h
- Active=19 O- p7 V2 Z k- r* F/ w
- ---example---
5 H7 d# X( P% p. u& Z' ^; K
5 y3 s5 F( W9 V9 O) Z$ S- On a windows box, also running the MySQL server locally, it would be:! ~6 X! H3 K7 u- {+ _. t1 n
- ---example---6 L* G6 Q0 b: Q* s! T1 z& K6 E
- [DBEXPRESS]
# y$ f) m3 @: o4 c - sqldir=mysql_sql5 y/ t7 J" m) {! Y
- Drivername=mysql
, e# R/ d+ h6 T - Database=test
) M" t( ~5 f6 x& y p - Hostname=127.0.0.10 `3 | x8 m! J: w+ a i
- User_name=testuser
# w. ] R& Y% a, _% e - Password=my_password7 {# {3 V$ k& l' Z9 m
- GetDriverFunc=getSQLDriverMYSQL2 j/ K/ |8 y% F) p" c
- VendorLib=libmysql.dll+ g9 f9 N. m& `* ^+ K
- LibraryName=dbexpmysql.dll
( W) E8 b$ ~( F8 u. r Z - Active=1
& l0 r" }+ P F) C1 z7 D3 L- L - ---example----( H- t4 C2 D: V9 Z) m$ O
- - written 02.03.04 by pwk.linuxfan& \: p: n p2 s, H# D- M
* m1 {! t# T' | [6 J; q# g
复制代码 |
|