|
|
麻烦翻译一下,下面这段文章:xhan 5 }! y& ^1 N$ a& l2 q; O- q6 }; P
) A+ H' L. [# V3 g2 J; q
- ) a$ _ j$ |+ B" h, f9 Y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) [0 V; m- r# I1 T1 O - 3 H5 D& L; ?6 S( @+ U5 g
- ### What we need ###) p3 n/ f. |/ _6 A( v
- Naturally, we will need a MySQL server to store the data for us, this document
/ Z# T$ u+ R+ X/ L: ?; @+ b - will not explain how this can be done - there are documents out there for the 8 P/ u1 b7 o+ P8 M
- interested. The requirements include a (empty) database for TeamSpeak to use, w8 S" T, [! u3 x! s2 {, t/ x8 E8 E& j
- and a user account (username + password) that has the permissions to do stuff V6 ]5 Z W" V @/ |' ~$ I
- with the database. Additionally, you will need a vendor library installed on the
; ~4 k$ H, E6 e$ k# [) L+ R - local machine, this came with my MySQL install.
) T3 `' l' z, P - These instructions will not tell you how you might transfer your data from the
; n# G2 y. A, B8 `! _ - SQLite database to the MySQL database, we start with a clean and empty MySQL; ]- a9 {* ^; c6 l
- database.
2 R; g/ b% j8 Y% x - Some users have reported ways to import a SQLite database into MySQL, but at
% _* O& d% E- y4 a* D3 r - the time of writing, there are still too many issues - check the current status
, p+ ~/ u$ x$ G' j( I - in the TeamSpeak forums if you are interested.% _, R: |- w# ~
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" L0 @/ Z: I7 b3 {, x - Borland was used. This driver can only interface with the client library that
/ ~, p. U+ P0 g. L; B/ D - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
v' }4 A A% \% a. z2 t. p - client library - basically all you have to do is to use a 3.x client library as 8 x' g9 m5 L* a1 _& i+ B
- "VendorLib" and a 4.x database to connect to.: z0 S3 n8 i& { W( ]& X4 I+ ]% C. i2 I
- If you need more info about dbExpress, you can contact Borland.
( P4 [ y# F8 L$ t! X- ^0 R' J1 ^ - 0 N1 F3 p$ @( Q6 N& F% t% z
- ### Doing the work ###
7 m( {" d. l9 x' ?) I - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- m9 M% e9 ]+ o - the perquisites right, just open your server.ini file, and add this section at, X! D* l0 b9 n
- the end:( e; m+ V- L- x, ?
- ---cut here--- H8 d4 N5 V' S7 f' K1 _
- [DBEXPRESS]; U. x$ y2 @4 L9 j% p! l5 T
- sqldir=mysql_sql
. m( u- l9 }3 |, K - Drivername=mysql. T4 ^) H1 @. q$ P: a+ w6 o
- Database=Your_Database_Name_Here5 h' }, V8 T* H) B0 W' H
- Hostname=The_PC_the_MySQL-Server_is_on# U: m9 `0 H% W2 D
- User_name=User_name_on_the_MySQL-Server
9 D1 X9 [9 _# ~. U9 a - Password=Password_to_go_with_above_user_name. \( W0 }" t3 ^# A1 K0 k3 p
- GetDriverFunc=getSQLDriverMYSQL
. |/ o* A: P7 m' w& j( ?: A - VendorLib=path_pointing_at_your_mysql_vendor_lib5 N8 s! G& F$ Q6 z
- LibraryName=path_to_libsqlmy_libary
- f# \7 @) _' S/ O2 a: x - Active=1
2 b% h6 N/ p. [2 @ - ---cut here---
9 \1 d$ E7 u5 u; x6 P( K/ R - In my environment (a linux box with a MySQL server running locally) I have:% Q. F/ I+ V# ^- T+ c) w# R
- ---example---
% l8 s7 }3 _( }# \* B% | - [DBEXPRESS]
3 ]3 g/ c C" E( @ - sqldir=mysql_sql
0 W" w: Z/ U5 y1 _ [% w - Drivername=mysql
1 x$ i; q: N' X+ W+ } - Database=test
2 ?( l, S( b5 v( i - Hostname=localhost
4 N/ u5 y6 A- w0 ~1 \ - User_name=testuser
( m/ r% K3 c1 v2 D# i- c. a9 Z - Password=my_password
) n! t) N) ]" O& h& {9 O( Q - GetDriverFunc=getSQLDriverMYSQL
# x9 P3 a: j+ f; e - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" C8 P: `8 i: w0 H3 S$ w/ T
- LibraryName=./libsqlmy.so! ^. s P& A5 p0 T6 ]
- Active=1
* S5 J2 ^8 U, `, P& V( h3 V. } - ---example---$ `8 [- G/ Q" d) D
- ( z6 E F9 M' x) V) q
- On a windows box, also running the MySQL server locally, it would be:
) t# a6 o- A+ @% y# x6 j2 Z$ u1 k - ---example---1 H+ h* i; c# [* ^" h# m3 u
- [DBEXPRESS]
5 t; S; u$ j$ D - sqldir=mysql_sql
3 T& c! y# N1 O) j9 @" k, j% E - Drivername=mysql
1 `7 `+ l1 T7 u0 c+ d5 X7 O - Database=test3 h" u2 N+ \1 y h' `5 M% |* Q h
- Hostname=127.0.0.18 L5 w& r H! j3 D2 e! q
- User_name=testuser I& u1 W, k1 Z% b
- Password=my_password9 f9 m/ H' ]" j2 Y2 R
- GetDriverFunc=getSQLDriverMYSQL
, V/ t/ c1 Z; r& S* p, s8 ^ - VendorLib=libmysql.dll
3 ]9 j3 c8 |4 K9 d* D - LibraryName=dbexpmysql.dll$ k# y' d4 l2 g
- Active=1
+ ~5 h, M8 h3 e5 h9 ] - ---example----
4 u j4 d5 ?, S8 N - - written 02.03.04 by pwk.linuxfan
, H* w! P+ x) S& U
% x2 ]7 g2 |. z
复制代码 |
|