|
|
麻烦翻译一下,下面这段文章:xhan / I8 l4 K7 U0 `3 R
1 M5 i/ q: u+ w0 b, F: e* i! ~2 i
- 7 H& |% ~/ t" P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 c1 \7 m; \) J% D* _9 d - : S# w# y O' H, |' }0 o
- ### What we need ###* g' S" d" N: H) i) n& h
- Naturally, we will need a MySQL server to store the data for us, this document
3 i4 m% a* m2 k! ~3 w - will not explain how this can be done - there are documents out there for the 3 `: C! I7 l1 g7 M* O* G1 o
- interested. The requirements include a (empty) database for TeamSpeak to use* }7 R+ j, A5 x C+ Y/ p
- and a user account (username + password) that has the permissions to do stuff
. w9 Q" v6 j$ t% k5 J- o& O - with the database. Additionally, you will need a vendor library installed on the" d' i Q$ V' L; \
- local machine, this came with my MySQL install.
3 \, B" H0 c4 p8 h& C' r. P0 i+ d - These instructions will not tell you how you might transfer your data from the
/ E6 J9 `2 P' S& a) a2 L - SQLite database to the MySQL database, we start with a clean and empty MySQL9 [! z" D. `# A7 g4 r" v
- database.
) {& t" d# K6 M8 n* ~4 V' u; | - Some users have reported ways to import a SQLite database into MySQL, but at
2 w* t( o a( P D! V3 A* l - the time of writing, there are still too many issues - check the current status. {, L F7 M3 x9 @
- in the TeamSpeak forums if you are interested.; M- d# E) ^$ j5 L8 ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* a6 r# C, o3 o - Borland was used. This driver can only interface with the client library that M3 G" C' h& }" X; b+ k
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 Z: b4 D, m% Y! Y
- client library - basically all you have to do is to use a 3.x client library as ' f; L+ ]# w5 i3 o4 Y$ p. c
- "VendorLib" and a 4.x database to connect to.9 ]- k4 s5 c% C
- If you need more info about dbExpress, you can contact Borland.9 s. u2 b$ e1 Q( p: C/ [, v
7 W+ a$ u$ ^# ]# j$ U- ### Doing the work ###
/ n, r9 O1 }! A4 R# e4 Y - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 Q8 l+ \$ _. l; V
- the perquisites right, just open your server.ini file, and add this section at6 k' N9 ?/ U) N# {- S" ?1 w
- the end:
5 n- r! B+ A8 h8 ^: V - ---cut here---: L! ~' M. S# V' g) ~3 `. t
- [DBEXPRESS]6 C- R7 E, l' q+ ^; d6 D8 F0 G& j
- sqldir=mysql_sql
* n' {+ D1 v' L# |5 T1 n' {6 y8 H - Drivername=mysql
; K( W$ X, b% q4 U# v3 a - Database=Your_Database_Name_Here4 Y3 f% @# K) Z8 ?+ m$ D
- Hostname=The_PC_the_MySQL-Server_is_on
$ |$ X0 m N- _5 m1 | - User_name=User_name_on_the_MySQL-Server5 [) E, Z2 M" Y0 O$ z
- Password=Password_to_go_with_above_user_name9 b& n* q4 ^0 Z! t# F
- GetDriverFunc=getSQLDriverMYSQL$ S; H3 q8 \, A* h
- VendorLib=path_pointing_at_your_mysql_vendor_lib
7 I" a: X5 |* w% E! w! u - LibraryName=path_to_libsqlmy_libary) c7 n6 Z! V8 K+ w7 M1 Q
- Active=1) q% ]' G H# p4 m% B0 v# [0 q
- ---cut here---) U5 Y) L6 o2 t4 a! }. B3 b
- In my environment (a linux box with a MySQL server running locally) I have:9 b7 \" D# }: z7 R1 e
- ---example---5 _# t) u6 W: G! `
- [DBEXPRESS]5 n$ K$ N+ F1 W! x. t( b
- sqldir=mysql_sql
' h H5 x, h8 U3 i& ]9 t, w - Drivername=mysql1 \# j" e+ E3 z4 \3 V- T( n& l0 W
- Database=test
6 c& u0 C5 k9 o* e" W. ~ - Hostname=localhost
( w6 \* N) E8 F& w9 ~ - User_name=testuser J3 F/ H7 P4 N) o3 M9 v
- Password=my_password! c/ ^8 c- k A* b
- GetDriverFunc=getSQLDriverMYSQL
0 a: v8 g3 d+ j3 L2 n0 _ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 y% S1 q4 G. P8 @7 l/ N - LibraryName=./libsqlmy.so. \5 v% @$ R5 l' ~5 e
- Active=1$ U9 V; V" c" S7 i9 T
- ---example---4 l" n' `5 Q h( E& y. U3 S
- , j. N* f1 G0 A4 _) f3 R: [3 i
- On a windows box, also running the MySQL server locally, it would be:# w7 w9 s4 J. W2 `
- ---example---
5 S' C! s! y4 p) ~0 k* T; s - [DBEXPRESS]
4 b* U+ V8 a) l1 k- \: ] - sqldir=mysql_sql9 \1 K# N K5 w! E3 u! \5 `, z. Y
- Drivername=mysql5 q$ M# Y4 t2 n
- Database=test
; \# w5 ^) o5 m; z8 M5 r - Hostname=127.0.0.1; \" @) m ^/ |3 Y! r; ]7 Q
- User_name=testuser5 w4 D/ N+ U k6 y" I
- Password=my_password* X3 y* J7 i8 n( ]: y2 K/ t+ g
- GetDriverFunc=getSQLDriverMYSQL
) c6 C1 q0 f1 O9 n' F$ |( u6 Q - VendorLib=libmysql.dll
( d7 W1 ~9 V6 | - LibraryName=dbexpmysql.dll2 a* C4 ^$ R1 e8 d
- Active=1
, Y( F$ O2 N' p - ---example----
4 f& X' P! @! `: N - - written 02.03.04 by pwk.linuxfan; _/ o- e' z' `/ t# Z# Q
* k. L! A0 B) c" a1 y
复制代码 |
|