|
|
麻烦翻译一下,下面这段文章:xhan L! `# S; w& p5 r
6 \' a5 D0 ]6 l# p4 `* C
-
3 L4 |$ m: T2 a* \; f - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! w4 p5 r) l; a. V - 4 G, x2 Q6 w l; `7 f. `* @1 H) t
- ### What we need ###
& Q! }1 H+ c6 W - Naturally, we will need a MySQL server to store the data for us, this document
. B. Y) F1 m* [+ V2 S* c0 E - will not explain how this can be done - there are documents out there for the ' c, x8 o8 ^- ]# T3 g3 y) w" ]* |
- interested. The requirements include a (empty) database for TeamSpeak to use
" f5 l! |+ J8 e- ^ - and a user account (username + password) that has the permissions to do stuff9 I& `) W* Q7 `
- with the database. Additionally, you will need a vendor library installed on the
# r6 j5 W( M% @0 y, Q3 R! } - local machine, this came with my MySQL install.6 m) l. C0 X' O8 @( N" m6 _
- These instructions will not tell you how you might transfer your data from the/ m, v3 E) `3 q% @) Q2 c
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. _6 p) n* o& s9 o5 i - database.
# y l& C% Y: r3 Q. f - Some users have reported ways to import a SQLite database into MySQL, but at
4 }; O$ W7 `9 R9 `& s3 X - the time of writing, there are still too many issues - check the current status
3 [" z. T: q, v# b+ H; z' z - in the TeamSpeak forums if you are interested.. `- p' k, x! X/ j9 O
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from$ C! i' p! w* P5 d- M
- Borland was used. This driver can only interface with the client library that
# u( H3 q n: ~ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# b$ _* R5 o- L! o - client library - basically all you have to do is to use a 3.x client library as
" h2 N% {; \7 K1 e2 z4 N. V Q - "VendorLib" and a 4.x database to connect to.
7 x6 H! J7 L9 B/ ~. E: N; F2 u - If you need more info about dbExpress, you can contact Borland.) a6 r5 A7 J- H- P. P8 ~
+ X8 j/ ]: w# G/ p( _/ t- ### Doing the work ###9 F& R! X6 Y% Z7 D2 s3 e5 X
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# {' H" n9 y2 F0 ?- M - the perquisites right, just open your server.ini file, and add this section at
7 g; P' p' @+ _$ ^7 u! j - the end:& }1 O, o. _! O
- ---cut here---& \8 e& Y# a0 D0 c* V
- [DBEXPRESS]
- A5 v7 ~# k- @. F7 C( r6 j6 F - sqldir=mysql_sql1 C! o# \3 M( z1 N
- Drivername=mysql' d+ r. e5 p& e3 v, [' o) Q, |: P: X3 K8 K
- Database=Your_Database_Name_Here& _! T: u1 ~/ z% I) s' @
- Hostname=The_PC_the_MySQL-Server_is_on
4 q7 K( u) I( P% J* u: C1 @! W' n - User_name=User_name_on_the_MySQL-Server
. a( B2 e$ e8 x7 A7 t% x - Password=Password_to_go_with_above_user_name
3 Q: h. n: ^ ?" D) M) P- H/ f" q - GetDriverFunc=getSQLDriverMYSQL
7 _. o1 b3 B7 m) l+ a, u M, U - VendorLib=path_pointing_at_your_mysql_vendor_lib
' Z' e# [3 |# E& g! E4 ^ - LibraryName=path_to_libsqlmy_libary, x- ~7 E& j, |% l. j
- Active=1
# M" l8 x5 h# ~ - ---cut here---
% s1 f9 g/ v" C! k - In my environment (a linux box with a MySQL server running locally) I have:
2 x: k6 J0 H8 l) R - ---example---; |& g1 S' p5 |7 B- k
- [DBEXPRESS]
# Q: u2 z4 I8 | - sqldir=mysql_sql+ k/ p* }+ n( z. N* c
- Drivername=mysql- o8 a D! J! C
- Database=test6 }6 V- z! M! m
- Hostname=localhost# A/ T* u* d( i: f2 x+ K7 } }
- User_name=testuser; u- X1 d, \0 N' C5 G P: Y9 Z2 e
- Password=my_password
1 s, v1 J J/ t# V6 m$ Y - GetDriverFunc=getSQLDriverMYSQL
6 n1 U: V6 L) ^ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 W, ^3 L& w& S - LibraryName=./libsqlmy.so
8 ^; s$ U# B) A2 D! d$ t' B5 L+ l - Active=1
- z* R. i3 [- M0 B' ^ - ---example---
2 _& I/ l6 [$ G3 h; v
6 g" _- `: @* k& d% J- On a windows box, also running the MySQL server locally, it would be:
1 d! Y5 y( F$ p - ---example---8 w! {0 @* O9 G4 d' B9 v2 _. n% V6 T
- [DBEXPRESS]
6 |) P2 D3 I1 X, r* A - sqldir=mysql_sql. y: t0 _/ j6 k4 @9 {5 ]/ X
- Drivername=mysql
/ s, H2 Y* s8 {+ O7 u - Database=test/ [) }5 ^& |# ~+ H* x' d
- Hostname=127.0.0.1
! F3 t. s! R/ \% I - User_name=testuser& P7 {; W9 w# P {$ O# C
- Password=my_password. P: s( z; q! R
- GetDriverFunc=getSQLDriverMYSQL
/ f: a+ c0 }% H - VendorLib=libmysql.dll& u( Z0 R: h& b3 G- l, l6 @% s
- LibraryName=dbexpmysql.dll
7 _8 Y; ?. v8 k* I! B4 i - Active=1
5 c& M7 K& C: U) C! V i - ---example----
8 s' D* T: [* W - - written 02.03.04 by pwk.linuxfan7 {) f( k# b! T( Y) b5 y
- . A: l8 s) ~6 C! c. i! n j# s. l5 P
复制代码 |
|