|
|
麻烦翻译一下,下面这段文章:xhan
- n$ u& Z5 L0 g2 N, F* Z0 f( M3 w7 o$ W7 f" p8 Z8 r! z9 u
-
3 X) u, D6 X# e( E) g - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
r2 E! t5 l# Y( P' ~2 g9 J - % o3 D/ k7 `) |
- ### What we need ###
) }9 v) W+ n/ f* _$ M' u; a - Naturally, we will need a MySQL server to store the data for us, this document
3 a2 K% E% F. ^7 G, O8 } - will not explain how this can be done - there are documents out there for the 9 s0 f) ~: a# C8 x. [' @, B8 ~
- interested. The requirements include a (empty) database for TeamSpeak to use7 I' N7 e4 N! A2 N [0 k
- and a user account (username + password) that has the permissions to do stuff/ d+ S7 x# S( n3 W* t1 Q- ~2 ^7 V! o
- with the database. Additionally, you will need a vendor library installed on the
, @- }% e( U! c3 A - local machine, this came with my MySQL install.
9 U4 g8 b6 t" W& R4 [: k' s4 s" l7 N+ P - These instructions will not tell you how you might transfer your data from the
4 l3 h# h; k+ }; x - SQLite database to the MySQL database, we start with a clean and empty MySQL8 L0 t- w) e( v8 u0 U
- database.4 |& X; ~- ^3 W8 @4 [
- Some users have reported ways to import a SQLite database into MySQL, but at
( o0 C. w# X( E1 p( ^' x - the time of writing, there are still too many issues - check the current status) t. j- C+ i. d3 R
- in the TeamSpeak forums if you are interested.
2 }/ L+ T* ?4 |' {5 l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ W) N6 x/ ~1 i$ W2 x& j
- Borland was used. This driver can only interface with the client library that
1 j) l! y* l; u7 b5 z! N2 a+ V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- k( G1 f7 S/ z$ f- e" d+ u5 w( t
- client library - basically all you have to do is to use a 3.x client library as
+ ^4 ^8 [7 ?/ Y; C! e - "VendorLib" and a 4.x database to connect to.3 V5 r8 `/ r) m, P/ C
- If you need more info about dbExpress, you can contact Borland./ @* T2 e; @0 @- K; R" d
- 2 x' z( I5 D8 B* w* C% l$ V
- ### Doing the work ###$ Q: C4 \6 H7 G- J6 G
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
) ]8 @+ C7 X9 Y. E+ ?1 X5 B - the perquisites right, just open your server.ini file, and add this section at
7 V* ?8 n" K) k9 f/ `7 Z - the end:
& q& Y4 i, w* @( d: e: B3 h - ---cut here---. k7 L5 E: n6 d( `$ h- c1 T
- [DBEXPRESS], L. W) M5 D9 C3 ?
- sqldir=mysql_sql4 n4 h) O. y, I5 N0 D) a9 V
- Drivername=mysql
) q3 }: O. @% H: K& S; M - Database=Your_Database_Name_Here
( a5 ^ o! V! ~- v0 } - Hostname=The_PC_the_MySQL-Server_is_on
, x/ ^5 u9 m. R7 p4 R+ j# h - User_name=User_name_on_the_MySQL-Server& K$ y& K/ E! `. U A* s& b7 V6 z
- Password=Password_to_go_with_above_user_name
! O. L& c8 t2 E6 s8 P - GetDriverFunc=getSQLDriverMYSQL9 D& a6 K& K% p4 d( B- |
- VendorLib=path_pointing_at_your_mysql_vendor_lib
/ A; H# w4 E1 S+ h! m% h1 ?# } - LibraryName=path_to_libsqlmy_libary
! T- m' ~0 s( M2 n& f+ D - Active=16 \+ H3 n, o7 C0 L2 m
- ---cut here---+ Y2 L9 O; l1 o* z) C2 X
- In my environment (a linux box with a MySQL server running locally) I have:+ b; `8 ?+ x" I) T
- ---example---5 r! K6 E# q6 ?# e& a
- [DBEXPRESS]
- C1 g E6 I1 T; G1 L. g2 n- s - sqldir=mysql_sql/ Y* K7 }. \. z) q! Z( \7 T
- Drivername=mysql8 h: W0 c0 H- U" M: ~0 k5 m) h k
- Database=test9 }- K* h, O0 n* J" a; _( N
- Hostname=localhost Q' b% F2 N: F u
- User_name=testuser
7 U6 f1 }. [6 @( Y% R- H. h3 X% C - Password=my_password4 i/ {. ?) |" V; q9 u
- GetDriverFunc=getSQLDriverMYSQL; i$ v( u ?6 ?3 g$ r
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 B0 Y4 d4 @: d$ w2 h% C
- LibraryName=./libsqlmy.so
% s4 b+ z& e$ W; i) | - Active=1
& `8 f1 ^/ y7 N0 k/ W' |5 T0 s - ---example---
/ P* v Y; c6 B. J
, {8 m }4 R8 r% K- On a windows box, also running the MySQL server locally, it would be:$ m$ Y# C4 N, A6 c0 Z' b
- ---example---$ f+ `9 E: N$ _: S. h. k/ Q _
- [DBEXPRESS]5 ^8 m" ^6 J6 ]+ s7 G- P$ j% K- }
- sqldir=mysql_sql- X+ i* k# ^4 ~4 n% h' Z
- Drivername=mysql
0 k+ i0 ~( ?$ G - Database=test
6 N- r/ e' K S8 A3 E$ I - Hostname=127.0.0.1/ Q# A/ m+ b/ s9 f, P# ?; {, r
- User_name=testuser
( {) }- A& i7 m4 S - Password=my_password
& n t# m& U% l4 H8 z5 f( _ - GetDriverFunc=getSQLDriverMYSQL4 M& L6 Z7 |/ t w k- u, q" L( t
- VendorLib=libmysql.dll
' k# k' C7 r- C - LibraryName=dbexpmysql.dll
: A" S3 ]5 s/ y8 x/ y: h - Active=16 H( @ t4 b+ M x3 ^- _# [
- ---example----
* d/ n! ?/ y" S5 |% h, `4 i& y - - written 02.03.04 by pwk.linuxfan ` j# N+ L9 _9 N
- 0 l% N. K! v, P& n! g3 f. ~2 q* U
复制代码 |
|