|
|
麻烦翻译一下,下面这段文章:xhan
3 A" {7 A0 L, v: I; I" i& p2 o+ T& L# K6 f4 D6 c" T9 [3 r4 X
-
1 a' U+ C# g( Q( N! A - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 r: J `2 y e! A- l
- & F( ?# i3 s" V+ u/ @
- ### What we need ###
: g1 p, b; M2 g3 u7 ~- g8 J - Naturally, we will need a MySQL server to store the data for us, this document . A) W# ?8 V- y7 Y' L
- will not explain how this can be done - there are documents out there for the
7 L, Y0 |- ~2 d1 j+ } - interested. The requirements include a (empty) database for TeamSpeak to use& _' J q% \) R# F; m
- and a user account (username + password) that has the permissions to do stuff3 n# E2 Y5 ]9 w
- with the database. Additionally, you will need a vendor library installed on the0 ~" y) P5 e% U- L8 _0 C: J
- local machine, this came with my MySQL install.
: k8 R* y( u' V6 k9 s6 w7 j% s+ u - These instructions will not tell you how you might transfer your data from the
3 j) g* K7 z, L( T - SQLite database to the MySQL database, we start with a clean and empty MySQL
' `; N; g% {6 D) O4 [1 n+ W1 ^ - database.
. l! P2 X$ f2 n6 |& b: ]; q - Some users have reported ways to import a SQLite database into MySQL, but at, M7 k( r9 S" f7 b" L, ]; _4 J
- the time of writing, there are still too many issues - check the current status
+ K+ ]& [$ p. }$ V - in the TeamSpeak forums if you are interested.
* ?9 ]) w7 f% o9 ] - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) ^ L( n3 B% W8 `! J - Borland was used. This driver can only interface with the client library that
7 i# H. R' }$ H - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 x. a: W s( |0 A" X
- client library - basically all you have to do is to use a 3.x client library as
3 b( [/ I* t% e' { - "VendorLib" and a 4.x database to connect to.9 N1 v6 R2 H$ J
- If you need more info about dbExpress, you can contact Borland.2 S0 E9 h: z8 I, w$ e
8 p( d) x9 U j- e( }9 J9 w- ### Doing the work ###
" P9 u# Q& W" d - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all4 w9 R+ V$ x' o) t# r2 J8 V$ n" o
- the perquisites right, just open your server.ini file, and add this section at
& r0 w0 u5 H9 m! _, n4 A# J - the end:
/ W& y8 A3 S* j; b6 p) n - ---cut here---# w# m9 y+ E# J g
- [DBEXPRESS]! I6 i5 c0 t7 Q6 }1 H7 g9 x
- sqldir=mysql_sql
' e# U% v- C6 u2 }) u" I - Drivername=mysql! X3 l6 i1 T! Q% n7 F
- Database=Your_Database_Name_Here
1 I. @& {4 m1 r! }. O/ ` - Hostname=The_PC_the_MySQL-Server_is_on
8 `; {0 t, w% X4 ^2 O* _ - User_name=User_name_on_the_MySQL-Server
3 {, D( v- J" Z: @7 L4 h& U; \9 E. M - Password=Password_to_go_with_above_user_name
+ n' [6 M; q! z; V6 L! y# t8 j - GetDriverFunc=getSQLDriverMYSQL0 v" o1 ?' o7 u, V" T3 f% Z. v
- VendorLib=path_pointing_at_your_mysql_vendor_lib$ L2 v) @8 K( w
- LibraryName=path_to_libsqlmy_libary
$ w3 n, d- q" T. g8 q - Active=1
* P( A* C6 J% }' ?0 {5 h$ w - ---cut here---
) p0 X$ b) \' F) |, h9 ]! J - In my environment (a linux box with a MySQL server running locally) I have:
6 z/ {# q, S9 b: r1 z - ---example---
2 ?% n" \8 D; C9 s - [DBEXPRESS]
. ^, j5 b1 ]/ ~, C* |* Z) ? - sqldir=mysql_sql
l- \+ V3 W" }- E2 X - Drivername=mysql1 F1 d+ n5 c" r8 U
- Database=test$ s, A5 a" D* \1 n5 S1 E
- Hostname=localhost C1 ]$ F% r. \# j
- User_name=testuser
: z V( O8 P& h. \ Z: b - Password=my_password7 g" Y" `, n; o
- GetDriverFunc=getSQLDriverMYSQL7 s- @! L/ d C
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- [9 F1 q4 ^5 m* G' d) J& j. k: r' E
- LibraryName=./libsqlmy.so+ \; P, U- P9 s, T' \
- Active=1
. H9 v* z" e. Z @( r/ ]$ h; L. d% X - ---example---" G/ `9 ~7 t) O1 I
- 0 c$ h& Z" _7 s, H& i
- On a windows box, also running the MySQL server locally, it would be:* k0 u; s/ s/ k" q
- ---example---) W1 s, u( r/ y0 t
- [DBEXPRESS]8 U& f9 X! z9 G( p* |- n3 Q
- sqldir=mysql_sql4 N: b6 |/ Z ?$ u1 x
- Drivername=mysql
$ n: p+ {3 n! i& k3 r. z8 O, [% q3 u - Database=test( ]& q( h6 l2 y0 i& U- Z) f
- Hostname=127.0.0.1. W4 ~/ o2 i# q2 G1 |
- User_name=testuser
1 J1 G6 U- c4 X7 q9 f1 o - Password=my_password
, ^. o# [* l) d& L5 U& J - GetDriverFunc=getSQLDriverMYSQL
( G b8 i9 j. Q- V% x' Y - VendorLib=libmysql.dll
( c! t4 J! e/ M& _, D - LibraryName=dbexpmysql.dll
7 k. f) u# n: M9 v7 ^; T/ s: p( z* N - Active=1
' F( I* |8 D! {# C8 g0 f1 @4 g - ---example----
o: Q& n. I& C- k4 X - - written 02.03.04 by pwk.linuxfan
% k6 X A% E" W4 |: r8 k9 e
9 J# j! v( Q: e5 |6 B; I" M
复制代码 |
|