|
|
麻烦翻译一下,下面这段文章:xhan
/ n1 N3 j( [* m" @& C% E7 g l( G4 E" W( B# o% k5 K
-
1 y: @& F! @ U - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 L {2 X' f0 i( Z - 0 y: }, M) O/ S! x0 l; F
- ### What we need ###
3 b' K6 F" u8 ?& T3 \ - Naturally, we will need a MySQL server to store the data for us, this document - w3 A2 @7 {3 I2 P- p+ s3 P8 |
- will not explain how this can be done - there are documents out there for the ; f& \) ]3 d+ l- o# o/ k. d
- interested. The requirements include a (empty) database for TeamSpeak to use3 t6 B( N. C6 e1 |5 ]
- and a user account (username + password) that has the permissions to do stuff
& J2 U( j$ Y/ Y$ y - with the database. Additionally, you will need a vendor library installed on the
) e0 U- R6 `" n; v$ V% m6 O - local machine, this came with my MySQL install.; C/ u0 Z1 g4 P8 c
- These instructions will not tell you how you might transfer your data from the
0 W: N: d% c2 m; k, O - SQLite database to the MySQL database, we start with a clean and empty MySQL
8 B: x( E( f( B R - database.
. K3 N; a* @4 X% q - Some users have reported ways to import a SQLite database into MySQL, but at$ S" t" d: {; K
- the time of writing, there are still too many issues - check the current status
) L0 I, T1 I0 M, H: _# n7 G" C - in the TeamSpeak forums if you are interested.
! x! d; Y) h1 H6 _( x3 l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, L1 B# ]! s. q! S) h - Borland was used. This driver can only interface with the client library that ; |0 s* o1 I( H' q" `. J- d! b
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
y! D% W7 l3 R r8 S - client library - basically all you have to do is to use a 3.x client library as
" C y1 z& P% p& G( W - "VendorLib" and a 4.x database to connect to.6 I' Z6 M Q0 N1 @! P
- If you need more info about dbExpress, you can contact Borland.. w8 U; H; \' ?
- 9 g1 U: e+ B2 {3 @* J% d: i
- ### Doing the work ###
. ]1 P$ u; o) p/ a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
2 F3 y) H. V5 \; l" E5 z5 S& W - the perquisites right, just open your server.ini file, and add this section at; C* s0 ~" A0 H- s) n: U
- the end:2 J# G- p" _: N# R
- ---cut here---
" t+ H C& u. }4 |/ p# h% A) p - [DBEXPRESS]
. R+ {. S* G6 U! w% e6 d, A( v% n - sqldir=mysql_sql+ d* F7 `7 z% }; F: X9 v0 r4 J: {
- Drivername=mysql
: b9 C" E* C3 o4 V/ N/ H8 y - Database=Your_Database_Name_Here/ N+ g9 I; D! \( n" g( W3 V$ h
- Hostname=The_PC_the_MySQL-Server_is_on& a0 I1 u2 c; y1 o( k$ w
- User_name=User_name_on_the_MySQL-Server
g- z6 M1 y9 S0 X9 Q - Password=Password_to_go_with_above_user_name' N, J# s7 d) ^3 e) @/ e" d" A
- GetDriverFunc=getSQLDriverMYSQL$ w" U- ]8 w% Q* u, i
- VendorLib=path_pointing_at_your_mysql_vendor_lib7 e2 X$ g2 g! t8 f2 R0 I
- LibraryName=path_to_libsqlmy_libary" ?$ J" X# O) d2 n: g# ^: h
- Active=15 d* I2 w5 C3 D- Y" U7 X6 n; `
- ---cut here---9 B/ M4 i- n7 x
- In my environment (a linux box with a MySQL server running locally) I have:& b) X! ?) b5 U% ~7 s9 G* Y
- ---example---8 A& H3 G. j" K* Y
- [DBEXPRESS]# J- {' B. m3 {1 Z7 b. I
- sqldir=mysql_sql* V0 w9 X; m+ i) e) k" F
- Drivername=mysql
9 u- V- A% t6 N' Q W - Database=test) |6 d. e: K. @2 K, @
- Hostname=localhost
5 b, V$ y, V8 C' h3 A4 G - User_name=testuser
, ]. n. \( f: n8 I; Z$ Z7 \8 t0 ~: d - Password=my_password6 }# C* `' d' U7 f( O
- GetDriverFunc=getSQLDriverMYSQL4 Y: `' J3 `7 \7 d7 H' B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' X; x9 Q7 _& V8 [; v7 k* o9 V - LibraryName=./libsqlmy.so* ?) W- y& j6 k5 J& c: }
- Active=1* v$ `- C# m4 f) P0 X
- ---example---9 F4 M' X5 J3 T$ t. w
& o0 {% K6 `$ E$ S- On a windows box, also running the MySQL server locally, it would be:& V! ~; X! F( {+ n! K2 `9 Y1 A7 ^3 D
- ---example---
8 ]( i0 y/ P2 L) @ - [DBEXPRESS]* q3 _2 t0 z( T* o' g- M6 x
- sqldir=mysql_sql, |5 P" Y: G/ A
- Drivername=mysql' |% N/ G* i9 [' A/ f* F
- Database=test
( m; u1 o: i1 i' M3 V4 m - Hostname=127.0.0.1+ z% ~6 V: ]/ A8 z. Y1 \; A$ J
- User_name=testuser
6 q) k2 D- W+ K/ R! Q |" k3 Q - Password=my_password
7 `! w( H9 S( H' s: r - GetDriverFunc=getSQLDriverMYSQL, u/ |, B$ @8 |( `( z
- VendorLib=libmysql.dll
4 c6 M5 a! [3 y; p$ y7 A - LibraryName=dbexpmysql.dll
. |( D0 Z, G" _( C - Active=1
# ~' {8 E1 j: T. h: s; C3 D - ---example----! ]3 P( x! z$ m$ q' v7 Y$ ~
- - written 02.03.04 by pwk.linuxfan
$ k$ h- W" g! [& t
& Z7 d, C3 e9 p7 n$ f
复制代码 |
|