|
|
麻烦翻译一下,下面这段文章:xhan 2 i# w+ m% m6 ^! g3 V3 R0 t. W
# ~. I4 w* b" K" {9 V( p
- Q5 T9 `/ G( P6 @) `: p" T
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; N$ E" c3 \: J- h1 B! a8 _3 x8 P - + n* e1 s8 T }' u# }4 o3 Z
- ### What we need ###6 C- w( I! k {( a, S
- Naturally, we will need a MySQL server to store the data for us, this document , u- `: [& |' X. y9 n# J: ]
- will not explain how this can be done - there are documents out there for the ! ^3 i. ~% y+ d( |
- interested. The requirements include a (empty) database for TeamSpeak to use
5 s4 q2 h+ B; T - and a user account (username + password) that has the permissions to do stuff
) ]5 s" J8 c) ~. A( ?" k9 O - with the database. Additionally, you will need a vendor library installed on the
8 P) `# Z; j/ Q3 ~" Z$ w1 z* @ - local machine, this came with my MySQL install.: c0 i9 r0 v# g' A2 }: N: o7 Q" j
- These instructions will not tell you how you might transfer your data from the
5 R$ h# s# E& d3 s( E6 r - SQLite database to the MySQL database, we start with a clean and empty MySQL
( T* e2 { y3 |+ `+ M* H: x - database.
2 c) \: A( S( O; L - Some users have reported ways to import a SQLite database into MySQL, but at1 l( T) r1 \& U: o
- the time of writing, there are still too many issues - check the current status- p8 F4 O: ~( Y/ g3 Q$ u
- in the TeamSpeak forums if you are interested.
; _. u) x- U8 ]* e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 P/ F# t4 \2 V - Borland was used. This driver can only interface with the client library that , U; k5 A2 t: w2 u; `& B
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 j! }6 X( g5 q2 h# T; X - client library - basically all you have to do is to use a 3.x client library as 2 _. _# n% ]$ w# r7 d
- "VendorLib" and a 4.x database to connect to.7 d$ W- f0 E4 C; y- l1 o7 D6 y8 z' o
- If you need more info about dbExpress, you can contact Borland.; j) }! I1 E: f+ `. l. v
. N- S, }6 K$ o) J2 s- ### Doing the work ###( K& E: Z G5 [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( k. l9 a6 \! @/ L. z. \ - the perquisites right, just open your server.ini file, and add this section at
. x, ~6 @' K/ D5 | - the end:9 t- j' o7 C+ K( S l; a2 x1 T
- ---cut here---* V& A) V. p% [& b5 U3 ~' j; U0 m
- [DBEXPRESS]9 B' U( C4 J7 `( Y) R
- sqldir=mysql_sql1 u+ ^' u1 f7 \$ n( i i! |1 M0 s0 l' H
- Drivername=mysql, B, ?* X1 t) H
- Database=Your_Database_Name_Here
, l+ m# V% Q% D& @& D. E8 o - Hostname=The_PC_the_MySQL-Server_is_on
& H3 S# b7 q2 ^6 ~# N6 ^8 |9 O* W - User_name=User_name_on_the_MySQL-Server
6 B& u Z* E' }0 Z/ q - Password=Password_to_go_with_above_user_name
9 H" T$ D' X! j, _ - GetDriverFunc=getSQLDriverMYSQL/ h1 [; W: _. P
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% F+ ?! `6 @/ M' U1 }8 ^. A( } - LibraryName=path_to_libsqlmy_libary+ B" Z# `) X8 e1 t* y0 ?6 ]" F
- Active=15 ?0 z& j5 E3 u. K% |
- ---cut here---
0 ~7 G, h4 o- E - In my environment (a linux box with a MySQL server running locally) I have:
+ n! I) J2 P. x7 a/ ? - ---example---4 K( i% Q8 S$ w. f# M
- [DBEXPRESS]
5 p: q$ B, R( q# N5 p5 j - sqldir=mysql_sql
: O$ I. f9 P6 A# F, K5 x - Drivername=mysql
) }3 f+ E9 Y3 j( w/ C, m$ Y/ @ - Database=test
8 n( u8 d7 ?# V - Hostname=localhost% ~- h9 V% U0 n- r+ q: P
- User_name=testuser6 A+ N( G: p. L& Q* G% J
- Password=my_password6 ~- z7 u# a. `' v: g. k! ]
- GetDriverFunc=getSQLDriverMYSQL7 Z- W# F8 e$ r( V
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( n. w6 x7 ]$ V
- LibraryName=./libsqlmy.so$ m! L9 j3 G, V6 W, w6 z; W
- Active=1% _/ i t* Z3 _
- ---example---
8 `+ ^/ M+ u1 g0 @9 o& v - & t* R/ K& c( }+ X5 v! g, s
- On a windows box, also running the MySQL server locally, it would be:
6 @7 [$ Z2 z4 ]7 r( _. D& C - ---example---
8 X: g; Y% O4 z' H - [DBEXPRESS]
0 v- I E% h! f2 h - sqldir=mysql_sql
7 q0 W% ^% U# y4 x" X, K - Drivername=mysql% E! B _6 _7 M. }
- Database=test
8 D9 U# A* i( d - Hostname=127.0.0.13 f- z2 L M! L% b: X" n
- User_name=testuser" `" p, D5 f2 }) [5 Y7 Y# K4 `
- Password=my_password( O& s8 b5 t5 M5 K# @
- GetDriverFunc=getSQLDriverMYSQL
" R: K8 `* I( [/ D3 q - VendorLib=libmysql.dll7 f" z" n8 U: m9 D
- LibraryName=dbexpmysql.dll3 Z% a) Q0 h- L8 K2 z( V+ V- f
- Active=1
: r0 n+ k( d0 i) L - ---example----
& h* w- j$ j8 Y" `: E - - written 02.03.04 by pwk.linuxfan
0 c6 r/ S, s/ \( H
1 m( Q3 L9 N- }- S) [0 \6 i7 c
复制代码 |
|