|
|
麻烦翻译一下,下面这段文章:xhan
" h. ~4 V. U! l+ R- y4 V. k2 b* {' [/ U5 d% h$ z+ p
- 8 c9 N$ U5 E a; ?8 Z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) _7 o8 C- D" \' Z4 o4 \) M' ] - ' [) P# f; q- [7 o* C5 C; W- \! r/ o
- ### What we need ###
5 y/ g4 n% c' b; I( ] - Naturally, we will need a MySQL server to store the data for us, this document
0 F( ^- r% L' i' H+ r8 ^- C- d - will not explain how this can be done - there are documents out there for the
* ?- p1 A4 c- ~/ d - interested. The requirements include a (empty) database for TeamSpeak to use
, N2 Z$ j; c$ c1 s& d - and a user account (username + password) that has the permissions to do stuff
- _$ n9 J8 V( N* N - with the database. Additionally, you will need a vendor library installed on the3 U5 H! t2 j( {# N9 Q7 M
- local machine, this came with my MySQL install.8 z9 x+ O0 u$ j# ?, w3 o" U
- These instructions will not tell you how you might transfer your data from the6 b9 ~: @+ { b" |/ M0 W4 c) g) A" \
- SQLite database to the MySQL database, we start with a clean and empty MySQL* d R1 O" ^" Q
- database.
7 }/ T/ u7 ?( _: C1 f6 p6 I - Some users have reported ways to import a SQLite database into MySQL, but at; Y4 R2 Y, }# Z) E! f
- the time of writing, there are still too many issues - check the current status' B7 w& B. {6 q5 ?& u9 }' R
- in the TeamSpeak forums if you are interested.
v' D8 V7 C4 Y, M2 N - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ o& K6 }4 Q: d2 t - Borland was used. This driver can only interface with the client library that & N& d, ]3 ]7 L. ~
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
H+ B* P0 E) x) f - client library - basically all you have to do is to use a 3.x client library as
, I: A, @5 X O2 F/ v6 G8 D - "VendorLib" and a 4.x database to connect to.
9 V" c* v2 T* G- e: j& f( S - If you need more info about dbExpress, you can contact Borland.
- Y0 ~, Y! z2 k2 d: a9 A, e$ U - 9 {6 t) S. e5 {( R& L1 G) A
- ### Doing the work ###8 { W- c( Q, T o( e
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 P# `& f5 _& m - the perquisites right, just open your server.ini file, and add this section at
- B" m, Q8 [8 c+ C; L( M& m - the end:
$ B. w. c* c7 X8 L( v - ---cut here---! ]# z( G* |" h& J; K
- [DBEXPRESS]2 h) B# I4 n# N8 k7 Y# h
- sqldir=mysql_sql5 i! m c( \4 N# j; C; h1 a* _0 [
- Drivername=mysql J( [- B0 U; }% P) Z. j" p8 d
- Database=Your_Database_Name_Here
. s4 j* s+ m0 j F* l( N - Hostname=The_PC_the_MySQL-Server_is_on
) `' G! M% v6 b1 [) H6 i3 l9 x: ` - User_name=User_name_on_the_MySQL-Server
3 T) T( P+ E- j4 ^1 Z* O - Password=Password_to_go_with_above_user_name) |/ y1 s8 l# a& f* \$ ^! J
- GetDriverFunc=getSQLDriverMYSQL
! c" s; U$ z: J! D# X: c" y - VendorLib=path_pointing_at_your_mysql_vendor_lib
; P" ` v& Y' \* ~ - LibraryName=path_to_libsqlmy_libary7 W# T0 z% T: M v$ Y$ X
- Active=1
, v" W$ O, d. _9 Q- e; V5 `5 c - ---cut here---
0 y" [- q& x I2 m - In my environment (a linux box with a MySQL server running locally) I have:
$ u( a: D8 R6 y( ? - ---example---
1 H! @( W, v/ {- @/ F( k - [DBEXPRESS]! f, A, e. g) h' v; h
- sqldir=mysql_sql
& q0 o+ K: ~; E: f7 x0 \' w - Drivername=mysql6 l0 J9 Y3 a$ E9 C1 E8 I
- Database=test, E& x1 H5 I3 g; O
- Hostname=localhost
- v" z( Y' D F6 K7 a3 O0 D - User_name=testuser6 r& k+ l) ]2 K) Q6 F& l# f# J
- Password=my_password% B0 S) ^; }( H3 ~) t% L, I7 `
- GetDriverFunc=getSQLDriverMYSQL% H) A% A& F7 n6 d) `8 Q( L
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- P) J$ @2 v/ d1 F - LibraryName=./libsqlmy.so) V' B) P* U/ F3 ]
- Active=1' j( Y( b$ w( H! e% o% A& q9 z
- ---example--- g# j3 X) H7 o! N$ u( n
# ?$ k4 c# w6 ~- On a windows box, also running the MySQL server locally, it would be:
( U1 H! ]. m0 U4 t - ---example---
; `4 ?; s# O/ t+ s0 _9 H' R - [DBEXPRESS]
" O2 R2 a/ u; X! C/ Z% }& { - sqldir=mysql_sql$ X0 m7 s' X/ D$ u! x
- Drivername=mysql
. T) Z4 C* @1 ^ - Database=test# w4 ]0 J6 @' g/ A1 b
- Hostname=127.0.0.1
9 l- N" [; O. _ - User_name=testuser% [+ C' t& r* H% X7 f0 y
- Password=my_password
8 D' B5 s& M# `* L) R" u9 L - GetDriverFunc=getSQLDriverMYSQL
+ l* A$ Y' K$ I$ r - VendorLib=libmysql.dll
1 t4 O$ _: W6 ? - LibraryName=dbexpmysql.dll5 |5 a/ Y U- a* Y
- Active=1
8 v* k; S3 `' F7 k - ---example----
0 C& N% Y n1 V - - written 02.03.04 by pwk.linuxfan
, [. c; y) ?0 f
/ x+ i2 f( R7 {; S6 I @! J* i) q
复制代码 |
|