|
|
麻烦翻译一下,下面这段文章:xhan
3 O, c* {* k- f% g0 F( L- a5 T& H7 A
- 2 R! ^1 g& B) [$ E# D
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 W1 Z2 \ h% Q7 o
- / A4 ?' C, y% G$ ]3 N/ U( s
- ### What we need ###4 `; u. S F% o x+ k: d" r. b
- Naturally, we will need a MySQL server to store the data for us, this document ( L; {, ?% q( h3 l) r
- will not explain how this can be done - there are documents out there for the ) o s B# P9 U( N
- interested. The requirements include a (empty) database for TeamSpeak to use' @9 p9 B. ?, Q) Z: ]# g7 S* X. N1 ~
- and a user account (username + password) that has the permissions to do stuff% N8 q% _" E9 x% N
- with the database. Additionally, you will need a vendor library installed on the- }( Y- t4 o5 s0 E( ^% ?) L4 W
- local machine, this came with my MySQL install.
9 M0 h! J- A2 C# X5 z( u* M - These instructions will not tell you how you might transfer your data from the9 ]( u5 e% V4 O' I% _
- SQLite database to the MySQL database, we start with a clean and empty MySQL; i3 l/ z0 e7 R: q Q% |
- database.# l) m/ g$ s. \
- Some users have reported ways to import a SQLite database into MySQL, but at
; A* ]* ^' o2 j: E - the time of writing, there are still too many issues - check the current status
: q& y) S3 g* g. F- I. o - in the TeamSpeak forums if you are interested.
' L* y2 Y- S5 L9 x+ B- Q" F" a8 \ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 k6 }$ I% |4 o3 N* e
- Borland was used. This driver can only interface with the client library that # D ^2 j8 r& L1 t' X
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& N8 n% x* n5 a - client library - basically all you have to do is to use a 3.x client library as
0 k8 i) x. J- U4 u - "VendorLib" and a 4.x database to connect to.
8 z( ~1 _/ j: \: n - If you need more info about dbExpress, you can contact Borland.. Y% ~( s- z8 F1 N' m5 B6 k
- 4 V; w+ ^/ f$ H4 ~2 i
- ### Doing the work ###) g( u4 Y5 w, {/ M7 R1 y2 d
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& g$ B8 E T* J9 ]/ s" ^
- the perquisites right, just open your server.ini file, and add this section at7 W2 h8 L& U6 f4 _
- the end:
% Z+ I3 T2 E; {- a4 M - ---cut here---
8 B" ~. f( b8 o* M+ q& p - [DBEXPRESS]$ {' p! T0 K' o8 Z
- sqldir=mysql_sql
! T6 L# F" B* O/ {& S - Drivername=mysql
7 _/ `0 O) e" o - Database=Your_Database_Name_Here$ K5 ?( J" J& W( O# I D& N; Z+ B
- Hostname=The_PC_the_MySQL-Server_is_on
2 } ?& u6 g; u& q2 [2 t - User_name=User_name_on_the_MySQL-Server
0 n9 Y3 |' k$ }+ W# t5 f6 N. L6 s - Password=Password_to_go_with_above_user_name8 ^# a( p: J: s( d
- GetDriverFunc=getSQLDriverMYSQL
; |# M1 B7 Q4 _, h+ p" q - VendorLib=path_pointing_at_your_mysql_vendor_lib
1 \* i0 u: g5 f5 R - LibraryName=path_to_libsqlmy_libary
* e: B) e2 |1 l - Active=1
- q4 c3 m3 P, o: E - ---cut here---
% [1 O& L) X2 z' f) x - In my environment (a linux box with a MySQL server running locally) I have:
% R \. w2 t4 r$ t# b1 U/ m( o; A( ` - ---example---
, [2 }$ M( ?: r- D - [DBEXPRESS]( m" h/ s! K5 q* N8 o8 u& u
- sqldir=mysql_sql6 v% V5 B0 r' E0 w" J% y* d
- Drivername=mysql! u! g& Q7 z1 C, \* c1 r b
- Database=test2 f e3 {" J& j w
- Hostname=localhost
; S. o$ X) ?5 {1 M - User_name=testuser* i5 d* L, J( S$ s4 U
- Password=my_password! L5 O, C! T' z! U; c
- GetDriverFunc=getSQLDriverMYSQL
1 ~" }/ ]) P; N5 I$ s% r) S2 h - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" F0 O. U7 n6 ] - LibraryName=./libsqlmy.so
& s4 U; D' M$ ] - Active=1# ]2 u- a N7 o4 J3 b! h6 A7 ~8 V: `
- ---example---0 ~, B/ g: o; C9 z
- k& B) b1 w. }8 F0 |% L' _
- On a windows box, also running the MySQL server locally, it would be:
_) e$ m& f- m1 D - ---example---7 F; v) P) Y/ w; n! c' E& l L
- [DBEXPRESS]# R9 y" O$ j! U2 V7 j
- sqldir=mysql_sql
- Y$ {. R2 \; t, x+ X. X - Drivername=mysql: S2 e3 V) n: { C l
- Database=test0 t' }9 \# m" r& T- |% e: u9 Q+ ~
- Hostname=127.0.0.1
$ ? f; z$ S+ k6 i$ g3 _, Z, |) e - User_name=testuser( V2 D# h; U2 j6 {8 p# h1 C* c6 n
- Password=my_password
/ u% h& E, A* ^: W6 b% O0 G - GetDriverFunc=getSQLDriverMYSQL4 A5 S# ? C$ a, ~3 T4 {
- VendorLib=libmysql.dll* h" J, U& {4 x' s5 e( N
- LibraryName=dbexpmysql.dll
* `' K8 f K; o H5 p* F - Active=1
3 Z2 ~5 G6 P5 l0 p" A - ---example----
" V" P2 q5 |, X1 `. L( l - - written 02.03.04 by pwk.linuxfan
0 E: G- Z! M2 r( j d - % ], Y k e9 ^3 |" K! m6 K
复制代码 |
|