|
|
麻烦翻译一下,下面这段文章:xhan
* G- J& N1 F# m7 ^1 ~" j, g
/ w* f; g O6 D6 _! r+ X N6 `7 a0 x-
# G( U B5 l- S+ {7 ~* H# g. o - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 H6 ?% ^' s \, P8 ^
. [: X& u' S8 n& m- ### What we need ###2 p$ q+ e7 U1 p, Y# `0 N0 {
- Naturally, we will need a MySQL server to store the data for us, this document 2 \, k T( F/ L
- will not explain how this can be done - there are documents out there for the
! Z) E8 W7 L2 J3 Y; h - interested. The requirements include a (empty) database for TeamSpeak to use e3 p. a6 I. T" V; ?
- and a user account (username + password) that has the permissions to do stuff; a- O8 H( J9 n0 ~3 C, h
- with the database. Additionally, you will need a vendor library installed on the
5 ~9 u& F% B( F4 o. i% I. A - local machine, this came with my MySQL install.
) [ H5 j9 M& k1 y; L - These instructions will not tell you how you might transfer your data from the/ u( Q& F0 z/ w' w
- SQLite database to the MySQL database, we start with a clean and empty MySQL
# c8 y" F4 q, x; v% X1 d7 r3 P - database.
1 r( m" _: N0 V0 {5 g$ C - Some users have reported ways to import a SQLite database into MySQL, but at. c: @* G( b6 N2 O% { k
- the time of writing, there are still too many issues - check the current status1 v9 }8 ^# m$ Q6 p
- in the TeamSpeak forums if you are interested.' t9 Z3 [$ `. j) u- {( b
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
u/ l# z! z: P) V& f0 i" W - Borland was used. This driver can only interface with the client library that
' I7 z, U; Y `4 z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% o9 s. G; ?0 ^! ] - client library - basically all you have to do is to use a 3.x client library as 6 B p1 ~) w: n& w3 I
- "VendorLib" and a 4.x database to connect to.
6 W( {3 W9 z. A& M# C - If you need more info about dbExpress, you can contact Borland.0 p9 E, V" W* m$ Z$ Z- V4 c
( e' m- ^" X8 a. V( w* j4 N- ### Doing the work ###
; `6 v1 R) P& z$ F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all y" X: _3 E; r: S/ p# ]& m/ G, E
- the perquisites right, just open your server.ini file, and add this section at
4 u3 v- Y L: k$ @* w1 x$ s - the end:
5 A" a3 X% a+ \2 D( ~: A - ---cut here---
% I% e# Q0 C9 _+ d& o+ K) _ - [DBEXPRESS]- f* |; C! D) w! S/ l
- sqldir=mysql_sql
! b7 D$ U( B. G7 ]8 a/ q1 T - Drivername=mysql
6 k6 w, z0 ~7 F, m% L - Database=Your_Database_Name_Here+ Q, D6 g( h6 o4 L8 Q9 V2 X( n
- Hostname=The_PC_the_MySQL-Server_is_on0 Z& a& J. ?$ x' O" O2 L
- User_name=User_name_on_the_MySQL-Server% d+ d% C& W. B4 {$ E
- Password=Password_to_go_with_above_user_name" Q3 f* Z- C" S" h, d
- GetDriverFunc=getSQLDriverMYSQL
+ H n* h8 V" ?. D2 ^" Z% v, W - VendorLib=path_pointing_at_your_mysql_vendor_lib
; d/ z+ v* F ^( z3 \5 W; ^ - LibraryName=path_to_libsqlmy_libary
5 F: r. s! F; }' Y5 W' k+ \ - Active=1
8 q7 F1 S# V! J8 t/ n - ---cut here--- J# c) }( a6 d
- In my environment (a linux box with a MySQL server running locally) I have:
( i+ B. Q- K( E' g# p - ---example---4 q$ x+ ~) m' z7 h+ L
- [DBEXPRESS]7 Q! ?! i2 d E( W- n+ V
- sqldir=mysql_sql
3 _' l$ d. ]- C/ y4 W& E - Drivername=mysql; P: G2 c* x! }5 W) M0 t- d
- Database=test
5 n! [2 ~( f1 A - Hostname=localhost: {& W. G8 E$ u7 T. Z% W2 x: c
- User_name=testuser
% w/ Q2 O% [1 s: j - Password=my_password
& f ]% H0 H9 W+ X1 |# b - GetDriverFunc=getSQLDriverMYSQL% G: i x3 I7 j! y0 x
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 A2 t7 d3 h; f: Y- l* i+ r - LibraryName=./libsqlmy.so
$ ?& L) E8 y* E. y* j; Y! E: ] - Active=1
3 \. E- ]& Y N) { - ---example---( a9 ]% W. x6 v+ B
. ~) f, E3 W, v* l! y. z3 U- On a windows box, also running the MySQL server locally, it would be:
5 f0 z$ N; p* V. J - ---example---
$ {4 p# G! o+ D# C7 v5 h - [DBEXPRESS]
9 y9 ]: a! J. M5 w, V/ J2 ~ - sqldir=mysql_sql
7 A3 Z$ X. k3 K7 o [ - Drivername=mysql
; }! B9 b+ I1 P - Database=test) H/ U6 p0 f& D& d2 C
- Hostname=127.0.0.1
6 [/ @* u( l" d% a) a+ A' p - User_name=testuser
$ G! Q6 x, U8 t) ?* l - Password=my_password. l9 u. \! M9 J1 n# k5 j
- GetDriverFunc=getSQLDriverMYSQL; h& j8 @& Q5 j: u7 o! R' l
- VendorLib=libmysql.dll
: `+ R1 N/ b+ X( ? - LibraryName=dbexpmysql.dll3 n! O3 |- ~% z) j) x7 Q
- Active=1
- N; ]% s. f2 [+ q! S) N! i - ---example----
& S5 C& x+ G5 ^ C1 }" m - - written 02.03.04 by pwk.linuxfan
* \/ ]$ G+ q9 l - 5 E5 w, S/ A% @" C
复制代码 |
|