|
|
麻烦翻译一下,下面这段文章:xhan 2 C+ W/ U+ U+ `
/ m4 v7 h) W: Y: ~2 {5 y
-
: p+ e6 E) y) C3 v - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######" g+ u' M$ a5 g2 n, w+ \# C, K7 t
- S% l% d7 u: x& L& |" } k
- ### What we need ###3 c* m) J& X! \) x4 ^0 Z/ x
- Naturally, we will need a MySQL server to store the data for us, this document 4 W! u: c) R% U5 T4 s
- will not explain how this can be done - there are documents out there for the
- B- N( O3 M* y$ O - interested. The requirements include a (empty) database for TeamSpeak to use3 j. [/ M; u! A
- and a user account (username + password) that has the permissions to do stuff
+ i8 r3 i& @$ U ` - with the database. Additionally, you will need a vendor library installed on the- K+ B9 U/ w: j% q+ n+ E" @
- local machine, this came with my MySQL install.
( i3 Q2 s5 Z- R+ I e6 L' J - These instructions will not tell you how you might transfer your data from the" K& Y/ F" c' @4 j% [5 e# d+ ]0 {9 Z
- SQLite database to the MySQL database, we start with a clean and empty MySQL
% D( u) b \( ?" {% x - database.
+ O6 ^/ t0 D! _: U; C' c( r+ V( R - Some users have reported ways to import a SQLite database into MySQL, but at
# R. I9 F7 I6 n0 n* f1 G) F - the time of writing, there are still too many issues - check the current status
8 ~0 t% s1 W( \; k& _ - in the TeamSpeak forums if you are interested.
( D1 v |# m" I/ j; d9 W# O! ^8 t - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 g' P$ w$ S9 J' ^ - Borland was used. This driver can only interface with the client library that A3 E: o J5 ]9 N6 q
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 z6 i \+ A q" A/ J
- client library - basically all you have to do is to use a 3.x client library as $ K1 h# u) C! S4 p* z
- "VendorLib" and a 4.x database to connect to.7 j$ L k: h8 U' ?0 T5 U
- If you need more info about dbExpress, you can contact Borland.6 F% K: s$ A3 N6 q3 B+ i0 w, b
0 h. f# F7 T3 n- ### Doing the work ###* k3 B+ x7 p0 _5 a, X. H
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ ~$ w& Z0 o5 n0 y/ y; L
- the perquisites right, just open your server.ini file, and add this section at
9 r. P6 h0 E* T3 b$ r+ v/ z6 T - the end:; n0 a O9 H7 g0 B' T8 w/ b+ }9 o
- ---cut here---$ D4 q8 B; J2 X0 U$ N. W. @
- [DBEXPRESS]
$ x- X; f( n& A - sqldir=mysql_sql
1 m* } a9 m9 y% d. @ - Drivername=mysql
7 I4 J1 M6 T" T3 |- a+ V4 L& w - Database=Your_Database_Name_Here
7 P6 o! r1 M( C( O - Hostname=The_PC_the_MySQL-Server_is_on$ Y: X9 H# g( e) ]5 N+ Z
- User_name=User_name_on_the_MySQL-Server1 v0 a. U/ X) p: |( s) s- w
- Password=Password_to_go_with_above_user_name
8 F4 a/ V% S9 h! u6 o* o3 k - GetDriverFunc=getSQLDriverMYSQL
' f7 r; C4 V) I- O* @7 Y - VendorLib=path_pointing_at_your_mysql_vendor_lib
" @, Z; I8 ?6 `* i- ?4 @ - LibraryName=path_to_libsqlmy_libary: y% E7 p. _0 O) K
- Active=1: W6 F2 L F& m+ W/ j
- ---cut here---
* [& c V7 {+ k# ?0 a" j - In my environment (a linux box with a MySQL server running locally) I have:
* }; V3 J! Q- y/ g/ [( U - ---example---' y" n, S9 w, ?, {! d) [
- [DBEXPRESS]
9 E% i! U& H0 T% o( d- N6 P. F - sqldir=mysql_sql
4 V0 W0 ^- W" c" R `. N1 ]1 h' k - Drivername=mysql
; S3 ]2 C6 n6 o9 B+ O3 P - Database=test6 D2 h2 k6 j8 w% ?
- Hostname=localhost3 |, U* J# a o$ }9 x. x; v
- User_name=testuser
* @0 B& h M8 x0 D# H2 }* N! @" v - Password=my_password, `) r' V2 [6 R
- GetDriverFunc=getSQLDriverMYSQL
6 z% N+ D* q$ d3 l" C5 a - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: L' o3 @4 @0 [) o: n" F - LibraryName=./libsqlmy.so
! q- j5 V+ ]" U" h: `& {8 L - Active=1
9 v% W. R7 b5 f8 K- {2 y* P% E - ---example---
0 G5 O, p5 C/ \0 ^. n- t: I* o. J: U - # c* I* F, \3 S$ g# y
- On a windows box, also running the MySQL server locally, it would be:8 p5 T: \7 m3 T) J3 L9 C
- ---example---
; Y( W; l2 x3 j$ J - [DBEXPRESS]9 N+ l# c. k& B F
- sqldir=mysql_sql6 }& \2 D0 r" F2 @6 ]
- Drivername=mysql1 X! |6 X7 F& d6 ^, [
- Database=test6 f6 @: M2 M+ G6 a
- Hostname=127.0.0.1
& J2 j% T2 J- ]3 l8 z: k - User_name=testuser' C- r0 U8 D5 H3 k. W/ d3 F' j
- Password=my_password
. j, O2 M4 L ]6 \6 W/ p9 b6 ] - GetDriverFunc=getSQLDriverMYSQL# T6 P+ L' }! ^% ?' T8 x, v
- VendorLib=libmysql.dll
3 X( z. N5 Z0 v - LibraryName=dbexpmysql.dll4 V( i% A2 h2 j
- Active=1
1 @& r) i, ], j+ @8 e - ---example----, L1 J9 q- [, x: R* F4 Z
- - written 02.03.04 by pwk.linuxfan9 u- x* |) g" h: |4 L( r
- * {5 e( h1 X" H4 d' }" m# I3 @
复制代码 |
|