|
|
麻烦翻译一下,下面这段文章:xhan
: B0 j3 d! w+ o7 B: m7 K
* }/ `/ z/ F0 \0 |- ' G' _7 j, Y( J* U
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 C1 c; s9 q5 N8 ?% [
- " k) E+ n$ n7 c3 V0 n, e1 q9 ^1 I
- ### What we need ###" m/ R$ E4 t4 X# L$ [
- Naturally, we will need a MySQL server to store the data for us, this document
& \( n6 n$ O4 ]; K9 ]) C t5 c3 j - will not explain how this can be done - there are documents out there for the
" @' t6 f8 E$ z* {$ [3 ` - interested. The requirements include a (empty) database for TeamSpeak to use
( \0 ~2 C1 J. c3 h# Z - and a user account (username + password) that has the permissions to do stuff
4 D" B! \. `, y0 ~+ d - with the database. Additionally, you will need a vendor library installed on the7 Z9 S' f( r4 i l3 _, g
- local machine, this came with my MySQL install.: \; \( O2 }6 y; i5 l s
- These instructions will not tell you how you might transfer your data from the
% H; h0 E1 ?5 o" U7 B- Y1 Q r - SQLite database to the MySQL database, we start with a clean and empty MySQL
, j) V7 |2 y3 |; H4 P! n% p" c - database.2 l) c9 |+ n+ `. P O* f* G
- Some users have reported ways to import a SQLite database into MySQL, but at' y+ c p# E9 e0 y4 Z& b
- the time of writing, there are still too many issues - check the current status
, H. D. \& ~% m0 f$ c) I, ]9 N8 l - in the TeamSpeak forums if you are interested.
& u: k. Y- w; t+ X/ X! k- @ _& F - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from r% B( K0 G" i! K: [
- Borland was used. This driver can only interface with the client library that
4 Q( C4 _" l9 t6 Y5 y6 I, O; F - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# f" U' ]3 t# V( s1 ^3 _" P: X
- client library - basically all you have to do is to use a 3.x client library as
1 b' t* U8 x2 s w X A+ r - "VendorLib" and a 4.x database to connect to.
+ {, L! q2 |: W1 }" E" H - If you need more info about dbExpress, you can contact Borland.
' n0 v4 C4 [( K* I( V - # `# ~; F1 m: ?9 O( l
- ### Doing the work ###
; g# x5 V; m7 } - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 D( K3 ~1 u q; j, A
- the perquisites right, just open your server.ini file, and add this section at
v! a5 i$ d4 W1 h - the end:
4 I+ [! C* y/ p j5 ~ - ---cut here---7 ~# C+ \ I& |! R* l4 k x; I
- [DBEXPRESS]
8 i k$ T& K% F* d4 o) N - sqldir=mysql_sql
' Y4 z2 G$ q( `- l& D+ z - Drivername=mysql4 ^$ D8 P% H3 {9 O
- Database=Your_Database_Name_Here
1 _) m1 l0 L( k - Hostname=The_PC_the_MySQL-Server_is_on8 _1 v: r5 C) }2 A# L9 Q
- User_name=User_name_on_the_MySQL-Server# Q! S7 i% Y5 Y' Q( w- }
- Password=Password_to_go_with_above_user_name
& j, w' e( Y" J6 C s - GetDriverFunc=getSQLDriverMYSQL3 f# j: V! i4 b9 {
- VendorLib=path_pointing_at_your_mysql_vendor_lib, M9 r4 B8 p( X' Y7 u A" T) `( n
- LibraryName=path_to_libsqlmy_libary3 a$ u0 O% o- _6 p3 J; X
- Active=1" V# Q7 C: O/ I4 T& B
- ---cut here---
$ N M9 R5 M( h: }5 a, v - In my environment (a linux box with a MySQL server running locally) I have:* s; `& ]0 a* K6 r* |4 A
- ---example---6 L+ v# s u# |; X/ \
- [DBEXPRESS]
: `6 S) h0 H. q7 Q" _ t0 o - sqldir=mysql_sql
3 I. i+ y w/ i4 c - Drivername=mysql) D4 O6 [/ B% u3 p& I
- Database=test. V4 }; d+ p7 H
- Hostname=localhost
& q. R# g7 M* W. m, d* o9 G - User_name=testuser
3 s" G" m2 K' P8 k' q3 I q5 F - Password=my_password
5 U' A& m5 g. h4 N; v7 n t1 C6 l - GetDriverFunc=getSQLDriverMYSQL
' m4 X3 a4 ]5 i+ u. r( G+ W - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! f0 G6 o" z6 L B5 Y* R$ a( W n [& J! M' j
- LibraryName=./libsqlmy.so! N/ t) [# N& F l9 ?
- Active=1
& h6 E% q: }. g - ---example---
8 [9 }. G s) n- V* V" M/ W6 Z. m
$ ` i) j3 i& V/ ~2 K- On a windows box, also running the MySQL server locally, it would be:2 i" c3 Y/ F$ z8 a% z
- ---example---
( \ L1 H6 g4 ]4 h: N8 S J% T - [DBEXPRESS]$ U( N0 B+ g+ _; T; }
- sqldir=mysql_sql8 Y$ z/ k" p( f' K# `
- Drivername=mysql
! m. s- l; y! f: _ - Database=test
# c0 _2 h7 N9 m6 q/ c - Hostname=127.0.0.1
. `) D& P% t' H' y - User_name=testuser5 w* ~( M9 \7 J: h' @' i) k: Y7 S
- Password=my_password
9 r+ [) Q1 Q/ ]+ }* \$ y! d V* W' ^ - GetDriverFunc=getSQLDriverMYSQL
9 b) L# x% a9 w/ p5 i/ l$ s; M - VendorLib=libmysql.dll
$ I9 S6 [! E# q! \; G. Y/ V - LibraryName=dbexpmysql.dll
- o* Q+ Q. h! x, R! c- U - Active=1( f o2 @, F; _8 U6 S
- ---example----; Z8 D# J m0 J, u
- - written 02.03.04 by pwk.linuxfan/ [4 e$ t7 D. `* ^5 n
- + D+ X* d* w' Y
复制代码 |
|