|
|
麻烦翻译一下,下面这段文章:xhan
" J6 E2 {* v9 F) b B
. A4 m5 r- v- w5 C' d. P5 ^! F0 Q% C- 9 q; H% @% u* ^* _; |) ~
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' a+ [, C4 M4 }, y$ w - ( J& }" ]: S3 x
- ### What we need ###
) k/ S9 s$ w( Z9 X( } - Naturally, we will need a MySQL server to store the data for us, this document
$ A, u; u% `" n7 }: q - will not explain how this can be done - there are documents out there for the
( ]5 z+ @3 n0 S( e; b* u; F - interested. The requirements include a (empty) database for TeamSpeak to use
1 @' U- o i: n3 T% N* m - and a user account (username + password) that has the permissions to do stuff" g1 i5 _- _/ v- i" A3 A3 Z
- with the database. Additionally, you will need a vendor library installed on the
# `4 d; |- p: E+ L; b2 J - local machine, this came with my MySQL install.
* y+ }9 k4 P, m1 _1 u& a - These instructions will not tell you how you might transfer your data from the, I$ T2 Q. t5 U7 w! m( F: T
- SQLite database to the MySQL database, we start with a clean and empty MySQL% A% t0 Q" r: }* w
- database.
" ~. E* T$ b F* ` - Some users have reported ways to import a SQLite database into MySQL, but at# l/ J8 o+ i; g" s3 Z
- the time of writing, there are still too many issues - check the current status
. ~7 H* ^) v) q( ~1 M3 ?8 O - in the TeamSpeak forums if you are interested.( D9 _ { _( ]- |- g3 K; L
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( A6 c0 p2 F% [7 k% x7 n
- Borland was used. This driver can only interface with the client library that ; ^: T0 U& _, ?4 ?3 X
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 Q: V! ^$ P* k0 @
- client library - basically all you have to do is to use a 3.x client library as
+ ]& n9 z& _% X2 e - "VendorLib" and a 4.x database to connect to.
7 L6 J3 D- u6 t0 S# ]4 ` - If you need more info about dbExpress, you can contact Borland.
" z/ b) a* W7 ^4 T! e - 3 s% M# ?7 U4 p4 _$ ]1 Y: p7 g
- ### Doing the work ###
3 N& p* j0 R# V# B. p8 e: e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( `' Y/ q# Q8 j. w) ^. c$ O4 h- I
- the perquisites right, just open your server.ini file, and add this section at
% i. m2 N8 o) h+ |8 x% h - the end:' W' J0 S8 }, I) U# U
- ---cut here---9 W! @* b) l0 d
- [DBEXPRESS]9 ]- |4 Y! j) J+ U2 u
- sqldir=mysql_sql
+ c+ i1 q' u' g; r& m; G! G8 p6 g - Drivername=mysql) d1 B. F% Q7 @, ~/ D# \# A
- Database=Your_Database_Name_Here
; b/ _ ~, L4 _8 Q# k3 T - Hostname=The_PC_the_MySQL-Server_is_on
0 ~5 o# K# @. O& H0 H% M - User_name=User_name_on_the_MySQL-Server# _) B9 g! ?. f% O- v; @$ L
- Password=Password_to_go_with_above_user_name
1 g# ?4 i3 q5 ?1 E) I/ R3 T - GetDriverFunc=getSQLDriverMYSQL
3 U. F v4 X! ^- ^ - VendorLib=path_pointing_at_your_mysql_vendor_lib
j; W! v# R9 Y' l1 ]/ k - LibraryName=path_to_libsqlmy_libary
; y0 g2 X$ y. }- O - Active=1
: }6 b4 y" U. U r6 X2 p( ? - ---cut here---2 N0 l+ @& J& |6 G. [
- In my environment (a linux box with a MySQL server running locally) I have:. j% s2 w% Y5 E u/ t
- ---example---7 @ E, j5 K- b9 w3 T3 A6 s
- [DBEXPRESS]
( T' M8 h6 u4 \$ _0 ]- i - sqldir=mysql_sql4 O3 z6 g1 g) D) |* @, Y) v
- Drivername=mysql" f% K& d* I& d9 q/ W3 m! k
- Database=test5 }, c% x2 e. u& C0 R: \
- Hostname=localhost' D3 i6 }0 _; {& k+ R4 @
- User_name=testuser
2 h5 h, B8 c5 c; E3 R# b - Password=my_password
1 w5 X0 Q1 V6 u; ^* t% M, A% Y4 }6 s - GetDriverFunc=getSQLDriverMYSQL
- y( j2 Y" I$ L! B Q: n8 [! O - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
8 |$ }- A1 Y! s4 p/ \3 c% \, ^ - LibraryName=./libsqlmy.so. O- C! g9 W# K6 n: y
- Active=1. o1 U. N B; u: ^' e) J9 }3 u
- ---example---- o4 b% t: C8 n* G; N2 D: |
- % Y1 I$ C' d) i, O& t
- On a windows box, also running the MySQL server locally, it would be:
- B, W& V1 n7 ~/ e4 e - ---example---
. i7 p _( |. t# x( S - [DBEXPRESS]6 ]4 ^9 _! s d& \. e. F
- sqldir=mysql_sql
9 @* ^& b6 Y& p" k+ `4 c+ A - Drivername=mysql( k8 ^! ?8 \' m% e
- Database=test# L+ R/ B9 y7 ?
- Hostname=127.0.0.1
% r9 K) U# p; {1 V6 z: c0 `# k - User_name=testuser' ]4 {5 x6 ~% F9 C* E& J
- Password=my_password
0 g8 i" n5 i7 p5 y2 [ - GetDriverFunc=getSQLDriverMYSQL
* a9 l: V9 L/ o s. I/ e# ` - VendorLib=libmysql.dll
$ j& R2 B2 Y: U( D) m4 |2 F; n - LibraryName=dbexpmysql.dll
8 Q- {+ p, z* x0 a4 Q& f - Active=15 l# R& r0 Z; @& ^9 ]! @
- ---example----) X2 E$ O: G7 n
- - written 02.03.04 by pwk.linuxfan, m% t" G" _ ^% k y* ]/ I# d, H1 y
- ! Z+ }, M% O; l) A Q9 G4 ?
复制代码 |
|