|
|
麻烦翻译一下,下面这段文章:xhan ; I% v! n; ?4 f1 D
6 n: V' R9 X( }# i% b. g! ~- d
-
_( l# C3 s3 T; l) W/ f8 _, R - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
- S: i8 x4 x' e' o' ]5 Y - 0 e$ M* C+ K. G9 p- I( Z0 ]
- ### What we need ###" M! F: N& P5 Y* G# i' F
- Naturally, we will need a MySQL server to store the data for us, this document
, Y% G' Q; m: [& D2 F) J - will not explain how this can be done - there are documents out there for the
: }2 k/ B, n a+ ^& G# v0 K- t - interested. The requirements include a (empty) database for TeamSpeak to use' a; h6 @0 }" d; {0 X5 M- h7 _1 h* I
- and a user account (username + password) that has the permissions to do stuff% B0 u1 p4 e3 q
- with the database. Additionally, you will need a vendor library installed on the
/ H$ w' e+ C* Y9 u) X" _ - local machine, this came with my MySQL install.% D5 I4 A. v" a# Z+ y
- These instructions will not tell you how you might transfer your data from the+ t# F+ }+ a4 G; s
- SQLite database to the MySQL database, we start with a clean and empty MySQL3 u4 Y6 E, c9 P+ j8 v1 S" u/ j" b
- database.
! W$ K5 F1 V1 Q; f7 y8 T* W# Y - Some users have reported ways to import a SQLite database into MySQL, but at
5 b2 t- S% u8 x. h, m" |# o3 S - the time of writing, there are still too many issues - check the current status
7 I5 N! i. {( n/ t1 T - in the TeamSpeak forums if you are interested.' @: v( E' H! @; o
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# h" y- \5 ] q c$ v" j
- Borland was used. This driver can only interface with the client library that - _6 }- o7 s% Q. n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% u }8 `9 w6 N# x0 \: L - client library - basically all you have to do is to use a 3.x client library as
/ h q2 ~3 u( o* A' h4 S - "VendorLib" and a 4.x database to connect to.
& U& p, D) F. r/ H; }6 n - If you need more info about dbExpress, you can contact Borland.$ W) I2 l6 i1 G$ R4 O O
- ) [+ @1 E$ L, q
- ### Doing the work #### ^5 j- K @, u% \) K3 A
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 y" h! `# G7 \" D0 j3 P
- the perquisites right, just open your server.ini file, and add this section at
- N; Y, y6 ^9 N& A n/ Q- m, e6 C - the end:
( y4 Y" T- r M+ o. ^3 V, { - ---cut here---8 _% O; v$ e. h) @7 X
- [DBEXPRESS]- m* `2 g. C# Y. M* t$ q
- sqldir=mysql_sql- M8 X1 d( A6 C* j9 k T
- Drivername=mysql
9 U0 t; h/ \7 f* { - Database=Your_Database_Name_Here9 }$ v1 \/ T) h$ ]9 m j1 t
- Hostname=The_PC_the_MySQL-Server_is_on! u$ U; L' [) d, D( Y, T
- User_name=User_name_on_the_MySQL-Server5 M9 `. d' z0 A
- Password=Password_to_go_with_above_user_name* U, t6 P* l% w0 i" [" `6 ~
- GetDriverFunc=getSQLDriverMYSQL. w% c( @+ S; F( c6 u
- VendorLib=path_pointing_at_your_mysql_vendor_lib+ T8 w: l! U* ]+ j
- LibraryName=path_to_libsqlmy_libary, J4 \# y. n- B1 ^" h* p: k
- Active=1# C; u$ v; e% J' W8 \) D
- ---cut here---
+ K* p- V; J2 U' @* d9 F) c) W- m - In my environment (a linux box with a MySQL server running locally) I have:! B A: d+ u, I: N2 |, u6 `
- ---example---
* F* B3 |$ E7 V: F/ u) x - [DBEXPRESS]1 s9 n! {( N6 G2 `$ p
- sqldir=mysql_sql
1 u$ g J! F& c) M - Drivername=mysql
2 C }: Z0 w O- k/ H$ Y0 W7 o - Database=test; u' a! y# o" V: v
- Hostname=localhost- W4 ~* R2 y+ s! R6 G
- User_name=testuser$ m+ f$ o, D. q
- Password=my_password0 ]6 j3 ~! I7 d" [4 {
- GetDriverFunc=getSQLDriverMYSQL* m' q: n& U2 \
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- K1 E% `* t! E( \ - LibraryName=./libsqlmy.so: J2 o, g( r/ o& Q
- Active=1
( G6 A4 F- q$ R* {: X# i4 H5 a# Z1 { - ---example---5 U8 b' G, p3 D- [+ w( y
( X# |) K9 A o% v- On a windows box, also running the MySQL server locally, it would be:% }3 Z$ m" U$ G) n
- ---example---4 |, c4 ?% J6 b" h; ?: D7 o& T
- [DBEXPRESS]
, j' X& z2 `6 C7 }- z" S - sqldir=mysql_sql: K. q |. J2 p
- Drivername=mysql; M0 o5 j3 ~6 }' b0 M1 M5 H
- Database=test
/ e! X! }, `5 y6 ^+ P5 | - Hostname=127.0.0.1
, V/ @ Z( J' a f- F: w. m4 _: N - User_name=testuser
+ ~8 L2 M- P9 T* A/ v) I - Password=my_password
) _1 H( R+ k. l Z - GetDriverFunc=getSQLDriverMYSQL
& `; G5 b- a1 L( n g, }, e) P - VendorLib=libmysql.dll
! ^2 U9 e' j% Y' k - LibraryName=dbexpmysql.dll* H/ i& [' Z. ?( [- m$ k0 B \0 f
- Active=12 s6 J# B8 X+ g* g8 o
- ---example----( Y% e$ R6 X; Y+ a
- - written 02.03.04 by pwk.linuxfan$ b2 j- P4 d' y
- 7 l4 C# D3 L0 g9 t+ [' s$ c0 K/ J
复制代码 |
|