|
|
麻烦翻译一下,下面这段文章:xhan
6 [/ l1 G, J0 I. m4 D- r8 r' i( A' A' V- d9 ]1 P7 T, b
-
3 Q" t5 q8 Q1 o2 \' R - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( v9 ]" ~ x% {( {, K; ]$ H0 L. _! U - - e* @3 o8 i2 t- Q: O a% ?
- ### What we need ###
" [3 P* q1 h: M: ?/ ? - Naturally, we will need a MySQL server to store the data for us, this document ; t) i. U1 x7 r( B9 t2 Q; y2 }
- will not explain how this can be done - there are documents out there for the 8 p# z, {; r b2 f$ g
- interested. The requirements include a (empty) database for TeamSpeak to use0 i- ]! s0 g8 H3 x" L9 {+ `: ?/ p
- and a user account (username + password) that has the permissions to do stuff O: M2 d; N, \) c9 V
- with the database. Additionally, you will need a vendor library installed on the
2 X) a7 [; O1 e+ b* l+ F - local machine, this came with my MySQL install.
8 B+ A. E8 x$ [5 ~ - These instructions will not tell you how you might transfer your data from the0 N% S; t' m9 U& B1 c; ~2 R
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 u% W" \- J! U3 H! B
- database.
$ D6 O3 G+ B4 f& H: P - Some users have reported ways to import a SQLite database into MySQL, but at1 D+ x2 d7 q; Z |, L
- the time of writing, there are still too many issues - check the current status
3 U( \6 _- x/ T( D& s8 g* ?3 z - in the TeamSpeak forums if you are interested., j+ l1 t' P' g$ C( C
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 k1 W: v% u3 y! E U
- Borland was used. This driver can only interface with the client library that 6 @! E3 O* a) t# I) p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 F {- n" p4 K8 I4 j6 p
- client library - basically all you have to do is to use a 3.x client library as
; `; E# I, }7 |2 C: m - "VendorLib" and a 4.x database to connect to.- q0 Q- B; _( R* m% ]
- If you need more info about dbExpress, you can contact Borland.
* i9 X$ ]) A% A! s8 ~ - ' e& N% B5 g7 C9 D0 [4 r5 v
- ### Doing the work ###$ }/ N( S3 k" ]1 ^) n0 J$ U
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
1 M8 d1 R' N) n6 }& ^' l - the perquisites right, just open your server.ini file, and add this section at
8 }1 m3 g+ P- f5 f, O' P+ Z! `) f; d - the end:. C. Y6 h, Y e
- ---cut here---
7 x) H, r, R; f; D) G7 S# X) X - [DBEXPRESS]4 G6 D9 q4 f8 K9 k- m9 D) i, T
- sqldir=mysql_sql
# p2 J( z5 W1 p4 U% O& ] - Drivername=mysql
0 b6 R+ a a! e5 H - Database=Your_Database_Name_Here2 @& u3 _2 X# F, k6 q
- Hostname=The_PC_the_MySQL-Server_is_on6 g$ y* Z C/ v- p8 S5 h0 r4 t3 p
- User_name=User_name_on_the_MySQL-Server% P+ k% z4 v F( D& L1 w* c% b' K
- Password=Password_to_go_with_above_user_name/ E7 I: a3 J& }/ ^
- GetDriverFunc=getSQLDriverMYSQL% G Q3 g' M& t6 X" G' F I
- VendorLib=path_pointing_at_your_mysql_vendor_lib0 H" t4 T9 k4 b- x# ~
- LibraryName=path_to_libsqlmy_libary: Z" L$ _; Z Z! U6 z
- Active=15 Q! p0 q8 _9 Z6 c W( V: r
- ---cut here---
j0 R/ x& O# t8 y% v& x/ @ - In my environment (a linux box with a MySQL server running locally) I have:
}- B- c# x, ?3 B7 i0 n - ---example---
9 O2 ]" O. w9 r) k: b# a - [DBEXPRESS]$ ^$ p' c' ]$ X9 W3 e! O0 G# s- a
- sqldir=mysql_sql2 O9 v& g0 Z% Q8 o$ q' y5 A
- Drivername=mysql
1 w; A. T' R# A- o - Database=test5 f: ^: C3 ^% ?+ @6 R$ @
- Hostname=localhost
: {; H( W. w1 t - User_name=testuser5 d8 e* }- ^ o
- Password=my_password! I$ a& V k5 n( z
- GetDriverFunc=getSQLDriverMYSQL6 b6 y- Y5 |' _% C1 l( r: }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! U7 H0 q, l W# T0 L - LibraryName=./libsqlmy.so/ X9 Z0 H0 I: N9 j! M
- Active=1( {7 r% }2 i# f. b e# ]( K8 J$ {
- ---example---- v2 E5 e7 z: R" e- r! d6 w" U
- 2 \: ` |7 }/ O$ z h0 |- f
- On a windows box, also running the MySQL server locally, it would be:3 z! y& q* Z, a8 p, s, c% [
- ---example---
7 d( E, \: p# A; W3 Q ^8 ~ V' I - [DBEXPRESS]
( P, ^0 D7 ?$ I, [: ` - sqldir=mysql_sql0 \+ P8 ~, x! Q; p3 ]" n6 q% P; I
- Drivername=mysql
2 O$ J- l0 z# \, r- q9 u - Database=test' J0 D$ _0 I& E, g
- Hostname=127.0.0.1
( I0 ?3 c, P, [ }7 C - User_name=testuser
6 E' n$ b$ x u% f6 ^. l - Password=my_password9 e7 C: m v3 \( [0 t, @! V5 F! ?
- GetDriverFunc=getSQLDriverMYSQL/ i1 [2 r+ Y D7 J
- VendorLib=libmysql.dll. P' g( e7 r" _, O
- LibraryName=dbexpmysql.dll
; ^% Q& R4 s# H - Active=1- |' N1 w) T" S/ a: Y& {( H
- ---example----* T+ N0 q# k6 S& ?0 |
- - written 02.03.04 by pwk.linuxfan: K9 Y" T3 }( b9 l0 _4 i% z
- q# `# e! H) B6 f) L0 t
复制代码 |
|