|
|
麻烦翻译一下,下面这段文章:xhan
. u' Q1 n/ Q: B/ W9 U4 o3 a6 c0 z$ T( o" }$ K/ U0 Z
- ' q+ l& \- Q* f1 A; @
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 @3 Q( n% p. X, L8 j
- 7 b! \1 r* G% m+ Y0 b' h7 c* O
- ### What we need ###
$ e0 b/ u! u5 J - Naturally, we will need a MySQL server to store the data for us, this document , @9 N) y3 x" Z% P" A
- will not explain how this can be done - there are documents out there for the - W/ ?# }) q% R+ _( _
- interested. The requirements include a (empty) database for TeamSpeak to use; n, _6 x! f! O8 u [; s* I
- and a user account (username + password) that has the permissions to do stuff0 e$ o, f: \, _8 }0 K
- with the database. Additionally, you will need a vendor library installed on the. { @- ?0 ]; X
- local machine, this came with my MySQL install.
1 b7 q0 F9 Q7 @( W( {; G - These instructions will not tell you how you might transfer your data from the
4 E7 k) e; H$ j! [, w! f1 ~7 P - SQLite database to the MySQL database, we start with a clean and empty MySQL
, x; R* \4 ~/ G/ K$ X- n( N1 o - database.& Z: j! {1 P* R
- Some users have reported ways to import a SQLite database into MySQL, but at* w2 t& ~7 \& o9 L7 U
- the time of writing, there are still too many issues - check the current status8 o5 ?; d- I/ V6 s, z
- in the TeamSpeak forums if you are interested.
4 }1 s' z* i6 A: ]0 a/ i5 @( X - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 M5 e/ C. {2 w) l- `+ i" X8 F5 k - Borland was used. This driver can only interface with the client library that 0 @# \+ t+ ^4 k1 b* z
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ t& ^" I, h% I) m - client library - basically all you have to do is to use a 3.x client library as
" X. I, H7 `: y7 t* H - "VendorLib" and a 4.x database to connect to.
3 s3 ]6 r$ A4 I$ {. b - If you need more info about dbExpress, you can contact Borland.
, X' U3 _$ V" n' S1 Y' M2 Y - ; T* j/ f7 K3 _
- ### Doing the work ###) ]% ~6 O3 r& g x! V" v6 t3 U
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( l# H4 x* z' E" ]7 R, ` - the perquisites right, just open your server.ini file, and add this section at
+ y" R) O6 D; `+ ^& g5 k" A - the end:$ c. q: i* P% B1 T8 J4 `
- ---cut here---8 L, C, Q1 w9 y5 g: k8 S1 l
- [DBEXPRESS]
: s# g+ F8 }) {! \) P# } - sqldir=mysql_sql; f9 H7 A9 ^$ C3 O4 e
- Drivername=mysql) g7 K/ y! \ |$ [
- Database=Your_Database_Name_Here
1 z' V1 x- U5 z, ^. p5 U( ~ - Hostname=The_PC_the_MySQL-Server_is_on
4 I4 J4 T- q" W - User_name=User_name_on_the_MySQL-Server
Q- U& X* V. \0 |% l8 V" T - Password=Password_to_go_with_above_user_name
) b5 x7 S7 L j - GetDriverFunc=getSQLDriverMYSQL
4 J) l1 e9 m4 G& i - VendorLib=path_pointing_at_your_mysql_vendor_lib
! E& J4 |' i6 i; Z2 C2 P0 _7 ]$ D - LibraryName=path_to_libsqlmy_libary- Q; }4 E0 B+ D; N4 L( l
- Active=1
; t- F4 f6 P! L - ---cut here---* s7 w! ~9 d, L1 w, @) ^. ?
- In my environment (a linux box with a MySQL server running locally) I have:
( w* x- [3 o& t9 h! E4 o - ---example---7 G8 J# t0 Q4 t% L9 d5 N c2 U- q
- [DBEXPRESS]" a: p' U3 }. a
- sqldir=mysql_sql
9 H, P W( u! s- D0 a1 L. @ - Drivername=mysql
& \ v5 Y$ ~9 ^1 n$ s: a/ D - Database=test
" F; Z2 S, w& @ - Hostname=localhost# d" N. M' J" E. _9 Y
- User_name=testuser$ i5 b0 p$ H" {# T
- Password=my_password
( |9 G4 V& B" U - GetDriverFunc=getSQLDriverMYSQL
" k9 g6 [! |; K' o, I - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! o' L [8 c) J - LibraryName=./libsqlmy.so2 z0 }4 { S% |9 V% c# A; F! z
- Active=1
- v5 s3 n5 X" K3 I' Y8 { - ---example---5 h+ E3 m) x' t
$ u, h& M2 Z) D- On a windows box, also running the MySQL server locally, it would be:( m0 c* [/ J4 j1 l2 K% Z
- ---example---. |% R0 X: m- _& w7 B7 K$ k0 T
- [DBEXPRESS]9 h6 t: D4 W" G6 `$ W, C' W
- sqldir=mysql_sql- s5 v: C7 U5 x o
- Drivername=mysql4 ` }2 A' S2 Y& H4 H, O/ U9 w9 w6 T, m
- Database=test
' A% b5 [9 a# X. b - Hostname=127.0.0.1, g. G; F: D ~ |
- User_name=testuser# R4 n+ Z% U# W/ @, Y$ @& w
- Password=my_password; J8 J: T% b3 O4 z/ n4 [
- GetDriverFunc=getSQLDriverMYSQL3 h# v1 u& S6 ` G3 s
- VendorLib=libmysql.dll
. R3 S7 Q7 ]' h4 y1 n; ^4 l - LibraryName=dbexpmysql.dll' H9 P, }# m$ O% K# p
- Active=1
/ S, q/ U2 l6 s' J) n }' x - ---example----
& r! s5 y$ l' u% e1 E1 y5 R" ] - - written 02.03.04 by pwk.linuxfan
. |0 o3 p. ?8 I
3 B5 b# j2 c/ C/ o
复制代码 |
|