|
|
麻烦翻译一下,下面这段文章:xhan + ?$ b& z$ ]. X0 p% N1 K |5 C
/ e- o. P- s; j: ?
-
% _% u9 L' t4 q6 Y; t) ^) O8 D5 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 |: m' `8 E0 G" t
- T8 q" N5 a8 a7 e& U2 }! L- ### What we need ###
) U" m$ b! y& j - Naturally, we will need a MySQL server to store the data for us, this document
- }' n( _% l5 |* r3 b( `3 V. s7 D - will not explain how this can be done - there are documents out there for the ! K6 s' S. S6 l0 b% B/ o2 H
- interested. The requirements include a (empty) database for TeamSpeak to use0 x9 `4 A8 M! ? j% N# l: w
- and a user account (username + password) that has the permissions to do stuff
% x4 p' p0 R. H - with the database. Additionally, you will need a vendor library installed on the
. J3 v6 G1 G. Q - local machine, this came with my MySQL install.
* U* @" L2 z, E - These instructions will not tell you how you might transfer your data from the
: S: n) t/ O9 d2 Z, F# I2 t - SQLite database to the MySQL database, we start with a clean and empty MySQL
3 I: p1 l; U: U9 N; _. {( x - database.
' }: h* _9 u- w8 |6 u2 S% n - Some users have reported ways to import a SQLite database into MySQL, but at) {# ~5 j: u/ {+ n# I
- the time of writing, there are still too many issues - check the current status6 R2 f6 X% Z% c# s, V" A. J' r
- in the TeamSpeak forums if you are interested.! [9 j% z4 K+ \/ _$ y3 e9 b. j
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 ~1 G& I5 ~' l1 h5 }+ x - Borland was used. This driver can only interface with the client library that : _4 \; I; e* ?3 h. w+ w
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% W3 k' F9 F" ]6 y6 w8 H, A* r: j
- client library - basically all you have to do is to use a 3.x client library as ; G) L- c5 `% X w
- "VendorLib" and a 4.x database to connect to.7 L X' R: X$ G( [
- If you need more info about dbExpress, you can contact Borland.
. {7 x1 y; m5 r9 r4 e2 z; Q/ _ - , d' [5 O& N, t
- ### Doing the work ###
/ `, u. ?& y. k& P: f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; i* c; a) H# I - the perquisites right, just open your server.ini file, and add this section at7 V5 v) V5 f& B2 @! b
- the end:
+ e. U* s2 T" m8 n/ M3 s9 e8 t - ---cut here---
% T1 u/ P) U6 { - [DBEXPRESS]
3 d* X* W. }2 ]6 c* y - sqldir=mysql_sql, P/ i$ k& o9 ?) y# U
- Drivername=mysql1 Y( |6 | R. g4 ]3 R
- Database=Your_Database_Name_Here- l; |$ [2 @9 O
- Hostname=The_PC_the_MySQL-Server_is_on
* J% I5 H1 Q2 b - User_name=User_name_on_the_MySQL-Server
9 T1 X, k# R W6 \ - Password=Password_to_go_with_above_user_name
' Q. ]1 \5 |# G# n) G7 j# @ - GetDriverFunc=getSQLDriverMYSQL( x; W( h, z T
- VendorLib=path_pointing_at_your_mysql_vendor_lib% q, E& W5 [$ @5 ~
- LibraryName=path_to_libsqlmy_libary- ~" v4 I& p- w: e+ C/ }
- Active=1
8 ~/ ]. M* c4 z - ---cut here---* f% ~: G/ |& @ m" z. f
- In my environment (a linux box with a MySQL server running locally) I have:: t4 P. ?3 T& D
- ---example---
, R _7 P- r! C% y/ I2 X - [DBEXPRESS]
4 }! H a2 z& m$ s9 ]+ g3 X - sqldir=mysql_sql" E8 M$ q! F* l$ y
- Drivername=mysql) J# \1 q; t8 M4 Y) v
- Database=test7 _4 K7 K' v, h( I; ^. |
- Hostname=localhost
( a1 c5 S* U% r! m& b: w - User_name=testuser' @, O" A$ a q/ G7 ~
- Password=my_password. M- f4 M$ m% e
- GetDriverFunc=getSQLDriverMYSQL
8 \* e3 g! c7 C5 `! B$ Q$ [ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; |: W; }' l% \2 d* a. B
- LibraryName=./libsqlmy.so; a Q' F$ \0 k' k
- Active=1 n: V$ g: {1 M" ]: H/ k* p
- ---example---( {+ L$ @5 J9 S9 @
+ ^ L! f/ X+ H0 x7 O, U- On a windows box, also running the MySQL server locally, it would be:
* u# C" K9 F) i& G9 F' Y# f - ---example---5 f! Z, F {2 N' \# S4 u% ?+ b/ q
- [DBEXPRESS]" M! w9 v. u* r2 s* Q. |
- sqldir=mysql_sql8 A/ J7 P" R6 {4 z7 D# \
- Drivername=mysql) Z4 n0 [2 t0 p4 u; N
- Database=test" e6 U5 y* h) z3 _
- Hostname=127.0.0.12 n, F; ~) A0 d! x( y4 y: m! f
- User_name=testuser
8 A# a5 ^5 ]3 n# D1 U0 | - Password=my_password
+ g# r. ]4 y; C* S3 L8 h% I - GetDriverFunc=getSQLDriverMYSQL
& L. K$ t6 K: _! r( a3 _ - VendorLib=libmysql.dll+ h' h; @- B- t. D" ~
- LibraryName=dbexpmysql.dll
- e p V5 F8 p4 u - Active=1
. C7 Z$ i, s5 S( M& n1 C/ G$ r - ---example----/ w6 F0 N5 P2 L$ H) z
- - written 02.03.04 by pwk.linuxfan
7 @' K% h& G5 N* ?* ]* [
5 ?! P& ~) g/ R+ R% G# Y+ O
复制代码 |
|