|
|
麻烦翻译一下,下面这段文章:xhan + K9 i! L* E9 J5 O4 |( \
3 t' `$ T! L8 E& Y; z
- * t8 A) [5 g M n- `! b4 n8 f+ }
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ f* d$ q5 n7 W Q$ H
- $ t' c k V y1 e) b0 |
- ### What we need ###
7 M$ {0 Y- \% _7 Y, D - Naturally, we will need a MySQL server to store the data for us, this document
% V8 Y; {* O! p% r9 I$ m A4 i# Y - will not explain how this can be done - there are documents out there for the
' o! t f. z. P" m# B) f - interested. The requirements include a (empty) database for TeamSpeak to use
6 M* ^& V4 A+ c, J: S8 @ - and a user account (username + password) that has the permissions to do stuff
1 [7 g4 ~7 J Y6 e$ p - with the database. Additionally, you will need a vendor library installed on the
$ c c4 D6 Q+ W- Z& U - local machine, this came with my MySQL install.+ \3 ]( O. K" }' d& p5 `( z
- These instructions will not tell you how you might transfer your data from the9 p4 J5 B' r8 y
- SQLite database to the MySQL database, we start with a clean and empty MySQL |4 T# ~: |. w' U
- database.4 c& n' r% ^1 ]; ]: r# v
- Some users have reported ways to import a SQLite database into MySQL, but at
+ N3 i' |! B( ], S2 Y$ q' M( S# T8 ? - the time of writing, there are still too many issues - check the current status# G& j: O. f3 V, h9 S% S; l% V- J, k
- in the TeamSpeak forums if you are interested.
6 l/ [: Y. V. V7 k - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" R; b% u1 n3 u. W - Borland was used. This driver can only interface with the client library that * z+ c v u* L
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% } C* r. a( I( k" k
- client library - basically all you have to do is to use a 3.x client library as
+ ?' v2 H9 [' g% T, Y8 Y9 P - "VendorLib" and a 4.x database to connect to.! h" X& Q0 z! C. i
- If you need more info about dbExpress, you can contact Borland.
0 X$ ?* e9 q- P& J - 0 f( a; F6 ?% c7 P
- ### Doing the work ###5 t) F) n1 w; t m# c4 b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; R" B+ |. x! B, w% f - the perquisites right, just open your server.ini file, and add this section at5 B; j) J1 m; `5 | Q6 M6 y0 x
- the end:- z% V5 n3 Y4 Y: y; Z8 C& v
- ---cut here---
, ~# r z' N: _ - [DBEXPRESS]
. Y w* h0 t [ - sqldir=mysql_sql* c- Y+ `3 b% R9 p, e! i8 u/ S( v
- Drivername=mysql
. i5 b0 g1 p& E- e4 L - Database=Your_Database_Name_Here
; P1 n* I7 H4 I* n, f. P6 D - Hostname=The_PC_the_MySQL-Server_is_on
, h! j7 w8 [3 V5 R( ^7 t - User_name=User_name_on_the_MySQL-Server* c- C" c4 B: e6 C5 ?8 p! f
- Password=Password_to_go_with_above_user_name
& @3 k) t- l& ^# M7 ]4 X - GetDriverFunc=getSQLDriverMYSQL. g4 e q( q, T6 K- l
- VendorLib=path_pointing_at_your_mysql_vendor_lib
! O6 w0 N9 p! H. x - LibraryName=path_to_libsqlmy_libary
B8 p# n8 @! g, F; N; { - Active=1
' v4 I$ E8 d& j - ---cut here---+ \5 W4 o/ W$ |0 B* u. q0 o
- In my environment (a linux box with a MySQL server running locally) I have:) J3 C) I6 n4 Z+ n: C, I
- ---example---
( ~: o Q, d% L1 S9 V8 X - [DBEXPRESS]
# r+ N( {. ~. C) x. v - sqldir=mysql_sql
: m, k2 c) _; W7 \0 \( O - Drivername=mysql
% i. q" n5 R) T+ T5 V1 L( \ - Database=test
$ S+ Y, c6 i5 M - Hostname=localhost ~0 \0 _! q6 s3 H" {* U) c
- User_name=testuser
8 t+ [1 y/ y: v# { - Password=my_password
3 K9 x4 V2 @! O2 t6 @0 X3 c - GetDriverFunc=getSQLDriverMYSQL
3 _+ i8 L. @1 A% F; ? _& @ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 A w4 E; B+ _ T! Q
- LibraryName=./libsqlmy.so
! c2 Q; l* Q( o+ b5 ?: W) q: F - Active=1
% K; p5 B* j2 o# \' Y6 L - ---example---! ~) {7 `6 T/ @9 J | O
. c; ]1 T& o! Q, _, B! U) t- On a windows box, also running the MySQL server locally, it would be:% c; j: ~6 M7 K" `8 }7 F- |
- ---example---' x; d( X: }! z: V
- [DBEXPRESS]6 q7 F! Q' y0 O! f
- sqldir=mysql_sql1 O5 M7 @- i( ? l3 }) X5 q. @, h
- Drivername=mysql
! a9 x- H: p7 E) I) y) i/ W - Database=test
* a- [; T2 e! i! I3 o( D1 j8 [ - Hostname=127.0.0.1. d# r5 Z9 r8 H+ ]9 Z. f- A7 ^
- User_name=testuser5 O5 W; _6 r4 _* C* M8 C, U
- Password=my_password
! G5 t9 q0 s( P' v, Y5 W# y' \& z5 l - GetDriverFunc=getSQLDriverMYSQL' r: T2 G D. f( h
- VendorLib=libmysql.dll% ?- B+ |# R$ U! O. Q% q | `1 ]
- LibraryName=dbexpmysql.dll
0 `1 n, z) r% z9 \' w - Active=1
/ \+ P. |% q! U% c: T0 D - ---example----$ p4 C- k8 }( P) \0 E+ L
- - written 02.03.04 by pwk.linuxfan
$ ]9 n5 m0 s% W0 w) r
* C; `9 w" D4 Z' s2 m& ^9 T
复制代码 |
|