|
|
麻烦翻译一下,下面这段文章:xhan
; b- N: t% z& D- ^
+ X+ R$ v, S) n, A& y8 G2 O7 o-
; U+ A$ k9 j I9 ~9 t8 _ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 L O) R( m% D- V! ]( J - ! q) H$ w7 f# k" b+ V7 x8 s) X
- ### What we need ###
: D9 j. W$ F$ l/ M8 Y+ r2 E7 y - Naturally, we will need a MySQL server to store the data for us, this document $ l. m- C% t6 o# o' m
- will not explain how this can be done - there are documents out there for the
- n8 y, c+ l8 ~% Z - interested. The requirements include a (empty) database for TeamSpeak to use1 d0 a- t# ^5 W( u$ } Z
- and a user account (username + password) that has the permissions to do stuff
/ }% d) j7 @, k - with the database. Additionally, you will need a vendor library installed on the
: n4 v- r0 v4 T# a - local machine, this came with my MySQL install. q% p8 y7 o" E
- These instructions will not tell you how you might transfer your data from the
* z& o g, J3 d8 M3 T w. g2 c- K* } - SQLite database to the MySQL database, we start with a clean and empty MySQL
) q: E4 F8 a6 V6 h$ a - database.7 B* x, n. \0 ` C$ b' l w+ M- d
- Some users have reported ways to import a SQLite database into MySQL, but at
& Q ?$ B8 W0 ^ w* e% E! c8 `" U - the time of writing, there are still too many issues - check the current status: N0 k2 V* Q+ |9 U) S! k
- in the TeamSpeak forums if you are interested.
/ w/ y" `- K4 f2 u) ? - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& ?" Q; q; \6 i. a
- Borland was used. This driver can only interface with the client library that
, W/ ]2 w" a y/ }! N; Q; h# h - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, F$ u' z3 o" t! B
- client library - basically all you have to do is to use a 3.x client library as / u7 c7 A+ J/ ^- H" e7 g
- "VendorLib" and a 4.x database to connect to.5 S( k. n) s0 N" I8 O2 e
- If you need more info about dbExpress, you can contact Borland.
: O) b$ Q" B' y; f! F2 e
) R, b# ]0 b4 f, x- ### Doing the work ###2 s% z/ A% P" F" ~
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# f0 f f5 n: X! ]- x6 p' C. s/ u - the perquisites right, just open your server.ini file, and add this section at
( X, a ]2 ` V3 F0 S/ h4 o- b - the end:
7 i0 X3 a, b- O2 w9 b5 |% d% G - ---cut here---
. N. v: D7 m6 p! D3 v - [DBEXPRESS]
; G+ E3 ?- I7 {8 x5 V4 J2 Z - sqldir=mysql_sql
$ L7 @) z! w+ _6 i, o4 Q - Drivername=mysql
! H7 L" b2 ~5 o2 ~ - Database=Your_Database_Name_Here
' B! P- J0 n7 K( Y. E: u - Hostname=The_PC_the_MySQL-Server_is_on3 A- H' E& y0 _) H( y2 ^6 u4 K
- User_name=User_name_on_the_MySQL-Server5 E: h0 O- e6 s0 K
- Password=Password_to_go_with_above_user_name
. {" T* V, l, V. g - GetDriverFunc=getSQLDriverMYSQL# s2 j( b0 s0 [- R& Z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
, K) F8 I" v0 a' r$ p/ p* ] - LibraryName=path_to_libsqlmy_libary5 Y: O7 R2 V& c7 P8 w2 ?
- Active=1. h6 L* `+ W% K$ {/ k
- ---cut here---
# \9 v0 I+ X+ a( X9 g( x - In my environment (a linux box with a MySQL server running locally) I have:
' |6 S4 |3 u# j3 F - ---example---: Z7 t7 f% S% T2 J: A4 \ o' S9 ^
- [DBEXPRESS]
" O" J2 q: `5 w! R9 d1 i - sqldir=mysql_sql
; L; f# e2 Y- f4 z9 n - Drivername=mysql& h1 [8 L0 `/ a; t* A
- Database=test2 I9 S1 m1 J! ~& t x s
- Hostname=localhost
1 S [1 T) ^5 s9 Z7 G [ - User_name=testuser
" |6 `9 x/ ?/ A: E1 @' N - Password=my_password
. X+ T9 W s1 r# \" v - GetDriverFunc=getSQLDriverMYSQL: }* s" r& f7 K. I$ G& s" l# S0 w: `
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: E D7 J. ^" K
- LibraryName=./libsqlmy.so
5 [9 K0 c* H- x! U j* E" ? - Active=1
! e: t6 M& ~& o/ S) J% e - ---example---: b' s1 H( }( ~
- , y1 ]) `7 ]9 |
- On a windows box, also running the MySQL server locally, it would be:
3 m% R% T* C$ \% Y9 r - ---example---- E5 J d r- r; M5 S3 T$ i4 \
- [DBEXPRESS], p# m% `1 d6 ^# o9 C
- sqldir=mysql_sql; J8 B6 L/ P" b; m
- Drivername=mysql
9 a( X7 B" t1 w - Database=test+ R# f5 P' z- S G5 ?
- Hostname=127.0.0.1
8 |5 t0 k- l/ D - User_name=testuser7 m; M2 F4 M" B. T" Q/ ]; v
- Password=my_password
9 K4 w3 B4 ], C, B - GetDriverFunc=getSQLDriverMYSQL& r$ T6 Z4 o2 `( C; ~5 Z
- VendorLib=libmysql.dll- ^ |0 A# J+ X- V) r
- LibraryName=dbexpmysql.dll
6 V5 T* M, v4 h5 H: k* h- u! Y - Active=1
, B0 v! P! z: ]$ [: G6 C - ---example----2 h' N, b1 d C+ [* k8 ~" i2 z
- - written 02.03.04 by pwk.linuxfan
& P6 F# y6 c; w6 i2 s - 6 \% P. B' }& t- L6 S6 {( y& d
复制代码 |
|