|
|
麻烦翻译一下,下面这段文章:xhan / e& N& F2 O: j; s$ F& l I3 u
0 c% I9 x' x% y9 }' M4 n; Y3 Q
-
6 w* C( x R7 t \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
5 M( {" T# V! q
3 @, n6 Y2 p# K* q a5 D- ### What we need ###/ Y0 `, u$ e: |8 o
- Naturally, we will need a MySQL server to store the data for us, this document
, W8 U8 {8 @$ V2 O - will not explain how this can be done - there are documents out there for the / n% ^) r& r5 b2 F6 o" H" f5 }: F
- interested. The requirements include a (empty) database for TeamSpeak to use* u2 t- q( m, `6 |
- and a user account (username + password) that has the permissions to do stuff8 e V$ c+ ^4 B* t- T
- with the database. Additionally, you will need a vendor library installed on the$ h$ P! `" _. h% _! }' Y$ w S
- local machine, this came with my MySQL install.
) M" r7 b+ O2 \0 r( X - These instructions will not tell you how you might transfer your data from the
1 |0 q, U6 S- b9 ]* D5 }$ x - SQLite database to the MySQL database, we start with a clean and empty MySQL
8 }2 \" T: c0 Q2 x$ \' Y - database.0 z# N* Y/ @; G- c2 t) A
- Some users have reported ways to import a SQLite database into MySQL, but at. g/ }! S U0 J' T# ~/ ?2 a- V
- the time of writing, there are still too many issues - check the current status
8 O- s" U8 y" M- D% g' ~ - in the TeamSpeak forums if you are interested.$ A$ X: [) f; x' e" }
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- P [/ u% i8 o8 e. B" J - Borland was used. This driver can only interface with the client library that 3 ^% |" |& A- \0 T6 _4 [% z& J B
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: }. @" x ^! V
- client library - basically all you have to do is to use a 3.x client library as
+ g0 n& C6 m" c$ p8 k. U/ p; V - "VendorLib" and a 4.x database to connect to.% i4 V6 W5 |* ? K, ~
- If you need more info about dbExpress, you can contact Borland., h1 d7 o6 W) a/ G" [1 f* ]
. q1 [& X$ W0 }2 C! w1 K- ### Doing the work ###
- h( C0 }' } X" n" Q* U - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 \4 e; ?3 j# q3 c& Q% R - the perquisites right, just open your server.ini file, and add this section at
& y% j1 M& Y+ U5 A& o/ D - the end:
$ j, G" F# }" q S+ `$ u - ---cut here---
5 U+ Y& |- D' u! ^. M2 O - [DBEXPRESS]7 y- ]# J+ v1 G: v2 J
- sqldir=mysql_sql
! c( ^2 n) e$ w4 Z - Drivername=mysql6 C2 r+ F& T) b0 ^! C/ q9 _
- Database=Your_Database_Name_Here* P0 P! W1 l) U# o$ ]" c
- Hostname=The_PC_the_MySQL-Server_is_on
$ a0 A. {9 f8 I7 r) ] - User_name=User_name_on_the_MySQL-Server, @- j, Y+ T# m5 L7 v
- Password=Password_to_go_with_above_user_name
/ N5 Y! p( C$ }# L( g. M" K7 g - GetDriverFunc=getSQLDriverMYSQL
9 |" _- }9 R( C9 o: m - VendorLib=path_pointing_at_your_mysql_vendor_lib8 s( K; P, C7 P' c& j1 t
- LibraryName=path_to_libsqlmy_libary7 M6 P, q5 R7 \5 {3 [# |' f
- Active=1
/ v7 h& `" y \$ { - ---cut here---
J D6 e8 G3 D - In my environment (a linux box with a MySQL server running locally) I have:
9 E' w. z/ _' |$ f- D - ---example---
8 z d2 J3 r* T+ d/ E# d: r - [DBEXPRESS]
, ?* b& R4 w- u - sqldir=mysql_sql9 k$ E+ K: Y; S% N# g
- Drivername=mysql4 |; f4 x) i$ p7 F
- Database=test. K) r k9 {& m: |5 q+ k" ~
- Hostname=localhost1 a& X& Y! C# A+ T, }
- User_name=testuser' X! r" ~9 v0 v1 l0 r# p, P& ]6 O
- Password=my_password) r# q4 i* c2 H! h- C
- GetDriverFunc=getSQLDriverMYSQL
2 M. H0 L& V/ x& H4 L, h - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& J" M) l& S- E- {9 w$ d - LibraryName=./libsqlmy.so) R P9 i3 b( r% ~4 e7 A: d( H* n
- Active=1/ W3 {% w3 K3 l$ x3 V
- ---example---$ P7 H; w( j+ g+ y( y) f
- 2 A: |% w2 a* W9 _* G
- On a windows box, also running the MySQL server locally, it would be:! N- z$ y/ z2 ~+ q1 f. x2 m
- ---example---, [0 o+ d$ w" c3 D5 Y( a1 Y
- [DBEXPRESS]9 x5 v: K2 j1 B- L O" J
- sqldir=mysql_sql
2 [8 r0 B' W% q* M* L - Drivername=mysql2 _6 s4 o0 G3 p
- Database=test
0 S' ?3 {7 {% _; @0 q7 ^ - Hostname=127.0.0.1; u# ^4 n$ |4 Q" j4 }2 L
- User_name=testuser" \$ A: j( O* ?
- Password=my_password
/ G* k! b6 X, U, s - GetDriverFunc=getSQLDriverMYSQL
u o5 _0 w6 f4 y: S* c& W' m - VendorLib=libmysql.dll, o7 x$ \) W1 Q7 v2 h0 ?2 S
- LibraryName=dbexpmysql.dll
% E8 P3 w. l" X; a% P2 a - Active=1
* S: n: b0 V2 G+ s - ---example----; K3 @: Q- Y! G5 C1 @
- - written 02.03.04 by pwk.linuxfan
7 E3 n& i% u6 K- u+ Q# ]" J; v9 o. [ - % m P) ^( r& B+ R* g
复制代码 |
|