|
|
麻烦翻译一下,下面这段文章:xhan % N4 M j; l1 V' i- e& t$ I! q8 ~
( P C% n; m3 f8 e+ l$ x-
% {" q- J0 Q6 Q0 c - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######* d5 n) N5 b b5 m8 p
- 9 i- y% N1 o Q0 \ f- N5 t; P7 C @
- ### What we need ###/ V4 T1 [' e8 A/ b; K
- Naturally, we will need a MySQL server to store the data for us, this document
; E) X% W& h) g' n( }( D - will not explain how this can be done - there are documents out there for the
" C$ m( N' x9 d' d. t - interested. The requirements include a (empty) database for TeamSpeak to use
3 W( k x" g! b! S - and a user account (username + password) that has the permissions to do stuff( k- x' }; N" C; `' z
- with the database. Additionally, you will need a vendor library installed on the
* H3 B6 Z7 m: { q; | | - local machine, this came with my MySQL install." B/ u5 o6 K$ x- E
- These instructions will not tell you how you might transfer your data from the9 B6 o( y" r, w7 u* v2 z/ k. N
- SQLite database to the MySQL database, we start with a clean and empty MySQL5 W2 t. V( A$ Z& c
- database.
) A2 V( u# D9 I0 H' z/ o9 @ - Some users have reported ways to import a SQLite database into MySQL, but at2 e' N, ~3 f0 f5 D) L" a! J( e! U
- the time of writing, there are still too many issues - check the current status
& d3 x$ r. O# x& b - in the TeamSpeak forums if you are interested.
* k; B, `1 q# B' r1 y' F4 W - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& k O' g, M3 I! N$ c$ x; e
- Borland was used. This driver can only interface with the client library that
' a1 @7 n' Z) A9 a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. O$ V. E- ?9 @2 a& u8 {% v - client library - basically all you have to do is to use a 3.x client library as
2 O1 o# W$ P" T s+ D. D6 | - "VendorLib" and a 4.x database to connect to.
: V! M2 H* D0 @+ L2 z3 b0 i. V - If you need more info about dbExpress, you can contact Borland.2 F3 k2 K# P: c
- ?& Y G( A/ V* A, h$ Q5 M- ### Doing the work ###- E( `# @8 v1 V! b2 @& a
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 Y( c! O2 n2 R! y" f9 F& U1 L - the perquisites right, just open your server.ini file, and add this section at( w0 Z1 C; c2 q/ s' ?$ y+ b/ ?
- the end:
! J( w8 U6 Z/ B* q. J% n - ---cut here---4 y. X: E5 e: k& \6 P4 g2 `# a1 Q
- [DBEXPRESS]
/ y. a; i: M: W - sqldir=mysql_sql
' p+ w7 f, o0 ]6 ] - Drivername=mysql+ l1 a6 @6 A0 s% X, M2 Q# G
- Database=Your_Database_Name_Here0 i6 r3 `! \0 y& M5 o+ ?
- Hostname=The_PC_the_MySQL-Server_is_on6 X3 M) T) U9 k) K. [# ]3 G
- User_name=User_name_on_the_MySQL-Server& b s, d3 E: a& a
- Password=Password_to_go_with_above_user_name
3 E: h3 _: Y0 g8 h% v - GetDriverFunc=getSQLDriverMYSQL
: {0 l3 [' a$ L' L- I - VendorLib=path_pointing_at_your_mysql_vendor_lib
/ v& T5 c& L% F: X - LibraryName=path_to_libsqlmy_libary- d5 W( Q, B" I9 f
- Active=1) w' ^( z! g0 G. ]3 ]
- ---cut here---
) i# C, X }5 {4 q9 e - In my environment (a linux box with a MySQL server running locally) I have:
7 }5 k' F1 r1 h# W/ r - ---example---
0 I0 H' D+ \) E2 I9 }% b - [DBEXPRESS]* c5 F% M p) S I# _' _2 Y
- sqldir=mysql_sql2 C# o# _8 r& W$ u, ~+ s# Z
- Drivername=mysql3 W: u; `' }7 }8 C5 @( k
- Database=test
8 z) p0 J# C8 ~& ~# p - Hostname=localhost
7 g7 Z/ e- {# p7 G - User_name=testuser) F8 C! P; B7 b5 C, F7 ~- z
- Password=my_password$ B' e- ]% p; I5 T# R, U
- GetDriverFunc=getSQLDriverMYSQL1 J a1 L! a. h3 [: }! _
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.04 ~2 P T2 g$ A% m' c
- LibraryName=./libsqlmy.so
6 n: v4 C& U/ C+ {, g$ `5 r/ X - Active=1- z8 I- u, b# u9 ?1 J7 R) d
- ---example---
7 C1 j p0 a! ?" i# h9 H* h: N
. i# d1 e; C1 n1 t: i6 e4 p- On a windows box, also running the MySQL server locally, it would be:
4 d) M$ a( o: ~6 B) Q' M U - ---example---, I& z1 r6 i" B. O! M- g
- [DBEXPRESS]5 I& ^! V Z7 {
- sqldir=mysql_sql
2 P' \: M8 \6 o+ q - Drivername=mysql
5 V1 e& W' b' E3 _% ^3 q8 o3 k - Database=test' d$ I" L2 C8 B* q( a7 [
- Hostname=127.0.0.17 O2 V1 z; f5 E Z( s$ M# G# w
- User_name=testuser
: h" u8 V; R% | I3 a1 g( h - Password=my_password
& K0 u) R0 w/ Y: @ - GetDriverFunc=getSQLDriverMYSQL8 L b$ M1 V4 [! k; G
- VendorLib=libmysql.dll5 c& b1 ?) N' P
- LibraryName=dbexpmysql.dll9 f: M& {. n: u6 y
- Active=1" M: I! b- T& w( R+ B& B
- ---example----
1 u$ Z/ t% _ [( R: \9 v" ? - - written 02.03.04 by pwk.linuxfan
# t' q- {) O2 \. A
H) p1 E( \, P+ Z; o: u4 t# }% G
复制代码 |
|