|
|
麻烦翻译一下,下面这段文章:xhan
- _3 i1 i0 B0 \8 z2 @: k" v
3 i& c) X ^$ ?. X2 Y. ?$ \- / y9 s! a0 w6 f) U2 U
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& E( O0 t, d: ?: c. l/ l% w8 M; l - $ ~5 x8 J$ u" S" x0 g
- ### What we need ###2 p7 a& G* K) ]) Y
- Naturally, we will need a MySQL server to store the data for us, this document
6 F4 y. K! J# W. F0 R - will not explain how this can be done - there are documents out there for the 7 `+ j @; F( I, `4 b
- interested. The requirements include a (empty) database for TeamSpeak to use
8 `) P3 f$ C* p! v/ o: B: i+ x - and a user account (username + password) that has the permissions to do stuff7 Z5 b5 O# m; `4 W4 l: {
- with the database. Additionally, you will need a vendor library installed on the$ z) o8 U; L3 _
- local machine, this came with my MySQL install.
% c' K/ Z8 w! ]" Y - These instructions will not tell you how you might transfer your data from the
6 }" m3 j2 s! z+ E; s% D9 i g - SQLite database to the MySQL database, we start with a clean and empty MySQL
, ?# L& y, c8 O - database.6 A/ |' a, b+ a
- Some users have reported ways to import a SQLite database into MySQL, but at
+ ^7 K3 q% ]: L2 {* o, p5 v - the time of writing, there are still too many issues - check the current status
8 Q R, ^$ n2 M8 G: t9 f$ b - in the TeamSpeak forums if you are interested.
$ c( W' k9 U2 z) i3 k% Y' O - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ `5 o2 U$ Q9 O% e1 ^ - Borland was used. This driver can only interface with the client library that 0 d2 E ]0 @& n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 g# N- J- v; a* L5 m- e1 } q - client library - basically all you have to do is to use a 3.x client library as
2 _, p. g4 F" }/ m: q - "VendorLib" and a 4.x database to connect to.
. {2 ]+ J, O! |5 C - If you need more info about dbExpress, you can contact Borland.
9 @9 I; _9 o( j, E
6 h+ k8 z% G y: T6 @( r- ### Doing the work ###
2 ]# D$ |& c+ l4 U) b: r5 G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all# i- {8 _( ~7 r
- the perquisites right, just open your server.ini file, and add this section at
. `& c* w: y% v4 U - the end:
3 d- G# G, d- n" v( }3 x' C - ---cut here---( L5 ^' f, C9 e5 l
- [DBEXPRESS]& o2 S x- e' j7 Q
- sqldir=mysql_sql
4 \ x5 h+ Q, A3 n/ Q - Drivername=mysql# T) z: s. Q7 y5 Z
- Database=Your_Database_Name_Here! t* q6 M: {% N* p$ W8 e
- Hostname=The_PC_the_MySQL-Server_is_on
- u/ k2 Y. R9 R3 G# B8 Q! m5 T - User_name=User_name_on_the_MySQL-Server5 ^; Z c/ y; G; g" y* T
- Password=Password_to_go_with_above_user_name4 K/ {; y( @& ]
- GetDriverFunc=getSQLDriverMYSQL
" O3 l7 @; H. I, P5 F - VendorLib=path_pointing_at_your_mysql_vendor_lib( h# v5 g3 k6 T* p. T7 t- p
- LibraryName=path_to_libsqlmy_libary
! i9 {$ o) Z! W - Active=15 |. I: {( E+ x) Z4 L. h$ L0 K" a
- ---cut here---
$ Q& h! q8 f( s3 @, h1 w6 m5 }9 w - In my environment (a linux box with a MySQL server running locally) I have:8 `# C+ S: c5 G3 x' X3 p S) P
- ---example---
# g4 j& D* ~4 F9 `; D$ Y8 X! w; H - [DBEXPRESS]- Q; u) m* a1 M
- sqldir=mysql_sql* y& R& o( w; m* O
- Drivername=mysql6 N% C$ J2 l5 Z$ Z5 V4 M! _
- Database=test
. v- O o- s4 S1 Z! | - Hostname=localhost
! M) G9 A* F) ` - User_name=testuser5 e" _* O ?1 i5 H( d
- Password=my_password- L7 n2 v$ t+ t1 O) P6 Y
- GetDriverFunc=getSQLDriverMYSQL, Q$ c, ]" l, e( W9 f, }) ?' ? n
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
) ]1 m1 U" t1 [% } - LibraryName=./libsqlmy.so5 I( j6 O# P0 h& B: G
- Active=1
) T7 J' I) Z% P5 ^: f - ---example---; |1 t8 i4 J5 B* _8 y' C
- ! l( w. r6 f& @6 h0 r% T
- On a windows box, also running the MySQL server locally, it would be:' _9 t# q! p* y6 y
- ---example---
9 \2 n% Q4 W2 v" O( S- N: l! c - [DBEXPRESS]" a8 ~# v- V5 |7 A! v
- sqldir=mysql_sql4 V6 P, k! x* E. B' Q2 j
- Drivername=mysql5 Y2 Z. n; V5 f" }% b! {3 {1 a) Z8 a
- Database=test
8 q0 F: P3 H9 g+ M/ P* z - Hostname=127.0.0.1
) F' }; L7 u5 X& p3 ^' t - User_name=testuser
4 z1 Q( o* O" e# f& l - Password=my_password1 R) c! Y( u6 C( }2 s+ |
- GetDriverFunc=getSQLDriverMYSQL
4 o- ]5 U8 |: O# U+ G - VendorLib=libmysql.dll
8 O# n# w+ f5 Q4 L, r7 @ - LibraryName=dbexpmysql.dll
* i* W& T/ V, c - Active=14 o* Q5 b/ c8 m) t/ o) j7 ]0 B
- ---example----
! n/ k/ \) R Q* M - - written 02.03.04 by pwk.linuxfan; G* v K3 |( W4 ^. T
- 5 n$ O7 V1 I* D
复制代码 |
|