|
|
麻烦翻译一下,下面这段文章:xhan 3 i: B! r3 _% ]% Z9 H
, {2 B1 r6 v2 A" X" b* M
- 6 @! u: }' i9 h5 m4 r( Z1 t8 s
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 A7 ~/ N* c& o' I) v
- 2 n& m- J v+ e
- ### What we need ###( Y8 N. T. E V! N* v
- Naturally, we will need a MySQL server to store the data for us, this document
. H5 A4 f4 d$ v, ^. s - will not explain how this can be done - there are documents out there for the
6 {3 X7 q2 i1 K - interested. The requirements include a (empty) database for TeamSpeak to use# x: j# c% R \
- and a user account (username + password) that has the permissions to do stuff* ?3 h/ u2 M" N$ N6 x) Y
- with the database. Additionally, you will need a vendor library installed on the
8 D; ~- f/ q7 X4 d) q" s - local machine, this came with my MySQL install.
5 R' f4 v8 N" q - These instructions will not tell you how you might transfer your data from the
" }9 U2 c/ k4 o8 J5 f. \( j, { - SQLite database to the MySQL database, we start with a clean and empty MySQL1 [# Y( X$ X2 f% P" K- V* Q
- database.5 n; |, P1 L" }1 b$ E* j
- Some users have reported ways to import a SQLite database into MySQL, but at
) X7 f3 B! t6 m2 k* N5 e - the time of writing, there are still too many issues - check the current status8 Y7 B `7 `+ g+ a. U) B9 t
- in the TeamSpeak forums if you are interested.
! ]' P; K# P# F/ [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( c/ b* L+ X* U0 H+ G0 q0 p9 [
- Borland was used. This driver can only interface with the client library that ; u9 l9 ~, W' L& V8 t
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 ~: V" F( R- F7 z+ g1 H
- client library - basically all you have to do is to use a 3.x client library as
0 L, g" B* H, r) @# H - "VendorLib" and a 4.x database to connect to.4 O9 _3 X+ h, W# C0 ]* ]
- If you need more info about dbExpress, you can contact Borland.
9 Y) A; z$ p3 P
5 @# y C9 e3 i* R5 ^% I3 t- ### Doing the work ###
& U, W0 L" Q( J. {3 E V! s3 A1 v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% Q# s: [5 u: [$ Y, L3 S0 [8 M - the perquisites right, just open your server.ini file, and add this section at! u7 R4 T% M0 Z
- the end:7 {% e; y, E" ]- V: w6 j! _5 ?% y) p8 Z
- ---cut here---
( L% U8 f4 v$ r' o - [DBEXPRESS]5 ?, C1 F2 W, Y, S, e) R
- sqldir=mysql_sql9 O B& I0 k- n; n; s+ V3 R
- Drivername=mysql
% E# p% ~" {5 J: q - Database=Your_Database_Name_Here8 {- m, D) N4 F% W' j
- Hostname=The_PC_the_MySQL-Server_is_on( _! P( x8 r7 X9 {6 D& O
- User_name=User_name_on_the_MySQL-Server
% _' ^6 i$ |; l+ w - Password=Password_to_go_with_above_user_name4 _4 {) |4 ]4 e5 \/ O# @. {- q& y
- GetDriverFunc=getSQLDriverMYSQL
1 p- S/ R& H: q9 g9 m) K' M. P - VendorLib=path_pointing_at_your_mysql_vendor_lib
% B6 v# \: }/ O' L7 e9 J3 b - LibraryName=path_to_libsqlmy_libary
" V4 Y; n. ]3 p5 u( ]& w- p - Active=1
" F. K2 @& a8 i9 u _1 t - ---cut here---
8 D7 ?; p( Z$ v3 n) {1 @ - In my environment (a linux box with a MySQL server running locally) I have:
1 b9 @: V: n7 r; Z, u- h - ---example---/ ]9 D% D# u! [0 Z% ]' `
- [DBEXPRESS]
: l* b8 m) w1 [! n1 l - sqldir=mysql_sql5 k3 G9 p7 T2 O' D% N
- Drivername=mysql4 h2 |' w+ u6 F; [% u- O
- Database=test
1 n2 D, ]) l% i - Hostname=localhost% }$ i( H3 A* t
- User_name=testuser7 b5 n, F y% ^3 i% z# T
- Password=my_password% W2 }& |& M) H1 N0 w' v f( N
- GetDriverFunc=getSQLDriverMYSQL
# V+ ]) E& p+ c. l+ A - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" ^7 w' h# ^' C7 O7 U$ U5 Q$ | - LibraryName=./libsqlmy.so6 A* b. [9 a% ]5 y5 M, i' e( Q
- Active=1& e, Q/ s2 O) ?# t% T8 A
- ---example---
: I G! q( P [0 b* X+ t/ w8 ~) @ - & S" g( @, k* E/ t+ E
- On a windows box, also running the MySQL server locally, it would be:/ @( P" s9 \: C) l
- ---example---+ C, x, l" i9 X2 d
- [DBEXPRESS]
& P$ I w" K2 D" u - sqldir=mysql_sql) _" I; g. [" n: X4 W
- Drivername=mysql" H% D' x" i O; o9 P
- Database=test
0 G* e8 p* q2 v9 n' V. Y7 ~ - Hostname=127.0.0.1
5 r/ V4 ~/ z) {% R- v - User_name=testuser( L4 E8 m o3 {, M
- Password=my_password
. I2 k* G; Q& ^) o - GetDriverFunc=getSQLDriverMYSQL: I: X+ E! R$ e v- w( c
- VendorLib=libmysql.dll
* m8 T! ~1 \: Z8 s* @ - LibraryName=dbexpmysql.dll
# N* D# T& I0 N& H! n# q' ]% w7 Y - Active=1
/ Y7 ^; |4 f6 f) N9 f - ---example----
5 V: W1 D* F# p& L - - written 02.03.04 by pwk.linuxfan
' p& S9 D- T4 q. w" U
* p2 U* o$ [$ C) x/ C) C# b/ z+ k
复制代码 |
|