|
|
麻烦翻译一下,下面这段文章:xhan
6 Z- o8 T. A! O4 P2 m& f7 p3 l+ U' y# W0 z9 G, W+ D4 \! O
-
/ V! i% b8 K( a* X - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! b+ k, t: F' o7 g7 n; I U - - s, ^" R( a1 s, R4 ] v
- ### What we need ###
M- z5 p! m. u$ w. Q3 O l, ]% I - Naturally, we will need a MySQL server to store the data for us, this document . I4 S% }' a, r, F1 R) B& x: i2 P
- will not explain how this can be done - there are documents out there for the 8 z" e5 C4 _' ~3 E% g V- K
- interested. The requirements include a (empty) database for TeamSpeak to use
) P6 a& y1 q0 M; Q - and a user account (username + password) that has the permissions to do stuff! J- _# k0 v" s) i6 u
- with the database. Additionally, you will need a vendor library installed on the
; ~. o9 B8 ]" w - local machine, this came with my MySQL install. i4 ?. s$ j+ v7 r8 R
- These instructions will not tell you how you might transfer your data from the( [5 `. x( x$ d, c# p
- SQLite database to the MySQL database, we start with a clean and empty MySQL1 ~; U! F9 \& v% D* F
- database.
0 b% ?8 N$ f1 o9 n& k - Some users have reported ways to import a SQLite database into MySQL, but at
M0 M/ X- ~ l+ B- i8 F6 U - the time of writing, there are still too many issues - check the current status1 z) P ?3 V6 P5 C% c# y/ R
- in the TeamSpeak forums if you are interested.
1 Z) x/ I# ^+ w. j% a1 ` - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 M/ X' Z- [& J H" }0 q: L' X4 |* e
- Borland was used. This driver can only interface with the client library that 7 l z, P$ ^" U
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 r y; r: \1 ~
- client library - basically all you have to do is to use a 3.x client library as
# i1 e N* z' s: n0 c1 E - "VendorLib" and a 4.x database to connect to." F1 X# U5 }/ k4 V
- If you need more info about dbExpress, you can contact Borland.
7 x* A. R! P. j a+ N/ P; Y/ {6 c
2 J! C) P5 @) a N- ### Doing the work ###
# s, d/ h5 s: r/ q5 J - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 o& D6 F5 X( K, \. d - the perquisites right, just open your server.ini file, and add this section at" z. f9 P$ j2 `; C
- the end:' c4 w9 h: L# h+ `5 o
- ---cut here---3 j* f3 W4 b8 b7 t! s* m# t
- [DBEXPRESS]
' I3 z) h5 E4 \6 J9 U* m5 m1 a - sqldir=mysql_sql$ }, g C7 R# h' F
- Drivername=mysql
2 U w* V# S! |7 e/ Y) ^+ c - Database=Your_Database_Name_Here. ], g: O2 z5 d2 S" N2 W
- Hostname=The_PC_the_MySQL-Server_is_on* H2 T6 p/ G' G) }3 ~! w
- User_name=User_name_on_the_MySQL-Server/ n4 f8 p9 f5 z, l% N2 |4 c
- Password=Password_to_go_with_above_user_name
H0 { Y* M8 W o/ } - GetDriverFunc=getSQLDriverMYSQL" h1 C/ a# Y# v) v" ^& {* y- a0 n
- VendorLib=path_pointing_at_your_mysql_vendor_lib
* w+ O) Z9 z9 j - LibraryName=path_to_libsqlmy_libary
$ K ?" o6 r- T - Active=1- Q2 K- f0 [! _5 J( |# E
- ---cut here---! y$ [$ i" F4 N
- In my environment (a linux box with a MySQL server running locally) I have:1 b8 ]! X3 b/ B4 h( q
- ---example---, K" }3 r6 w% t0 ^8 P3 u
- [DBEXPRESS]7 ]4 H' N: {) m- b7 ]
- sqldir=mysql_sql
' T+ S6 `. E; K8 _' y: s/ b8 A - Drivername=mysql% }& ?) z9 F: Y! u& x
- Database=test
5 K4 N; ~, {+ r, B$ {/ l' F - Hostname=localhost
5 A! o3 k/ {1 {6 C! D" n8 K B; @ - User_name=testuser8 B0 e$ @" J5 T6 ~7 l
- Password=my_password
) T% M! b9 Y( |5 C, p) A- r- Z - GetDriverFunc=getSQLDriverMYSQL
* a/ _( y C( Y1 R+ o - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
8 b& g$ p0 ^& u9 e- S2 B - LibraryName=./libsqlmy.so
; D& \5 x4 i5 h! y, s2 C. S - Active=1/ ]* w; O* i$ J2 O
- ---example---1 r8 I! E: V4 V5 X6 u8 ]. [
- 0 z! B$ Y8 u P4 W& k8 l% a) T
- On a windows box, also running the MySQL server locally, it would be:
1 P" S. y: E9 V1 h% D - ---example---3 |9 y8 ^& P( W( E S: ?
- [DBEXPRESS]
% j' p& R" `0 E4 b8 [' ?- z - sqldir=mysql_sql
8 y8 w6 J3 u9 k2 F2 A H9 r, i - Drivername=mysql+ r6 k- e h0 ^ ^) U+ e7 E U8 ~; B
- Database=test) U/ g. Z, ^& i8 K# v
- Hostname=127.0.0.1
6 ?; q; C5 u T# S' u - User_name=testuser H/ }- r0 P2 U3 g: V3 N
- Password=my_password H) D/ i$ q% }0 Q2 E" ]
- GetDriverFunc=getSQLDriverMYSQL/ K, b# A! T+ q5 J( K6 c
- VendorLib=libmysql.dll9 M1 Q# _# M6 k/ {$ p
- LibraryName=dbexpmysql.dll
/ Q6 K1 M' M& g: D$ B! b5 y' I* s2 i - Active=18 u. o1 I7 D" [
- ---example----
; g, c) ^7 \' r$ v, X - - written 02.03.04 by pwk.linuxfan
1 E3 W a# Q) O: L$ {1 L1 Q+ D) ~
" E; [3 `* c- [
复制代码 |
|