|
|
麻烦翻译一下,下面这段文章:xhan
( I1 U3 U: x$ s# U* O( X) s) r' Y' K! V5 V3 l% r
- 2 C1 h$ X5 j% j, m
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 T4 z0 i8 i$ b8 @8 m" C
0 T0 Y. `: b4 u- ### What we need ###
- H$ H+ O5 E6 I W1 H! O! n - Naturally, we will need a MySQL server to store the data for us, this document ' ?6 Y( d: z4 W: f8 S
- will not explain how this can be done - there are documents out there for the ( h) h1 u$ e! \# E
- interested. The requirements include a (empty) database for TeamSpeak to use# T) t, t* z; H; m: C$ G( ~
- and a user account (username + password) that has the permissions to do stuff
% P% e% T7 U$ w0 ^ - with the database. Additionally, you will need a vendor library installed on the
' b1 L& ?( l$ D2 D1 o7 O3 B - local machine, this came with my MySQL install.
) `) }* l0 Y! U! b' K W - These instructions will not tell you how you might transfer your data from the
3 j# j5 R K8 M! E' b - SQLite database to the MySQL database, we start with a clean and empty MySQL
( r% Y% {8 S+ O1 N+ r4 w - database.
( ] E/ U. g$ X; u! ~- Y- j - Some users have reported ways to import a SQLite database into MySQL, but at" e2 c1 _* }+ X3 j" N
- the time of writing, there are still too many issues - check the current status1 B" L9 ?$ @# F3 U+ @
- in the TeamSpeak forums if you are interested.
% ~ k$ K4 a2 x1 X4 w - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. k! H% a# w. ` - Borland was used. This driver can only interface with the client library that
9 y' y* d `2 b4 t - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# x% }+ ?& r4 l" C; c - client library - basically all you have to do is to use a 3.x client library as 6 J- C Y& S+ K' p0 x7 O
- "VendorLib" and a 4.x database to connect to.
5 ]7 ?- [! G3 Y& z4 H - If you need more info about dbExpress, you can contact Borland.2 A' I3 H G7 E- j
% e3 f: ^7 w6 Z# ^- ### Doing the work ###
7 y/ X# n0 o4 b7 N - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, V, j& ?; }2 d- D" @
- the perquisites right, just open your server.ini file, and add this section at. K' k9 B3 I9 J: `5 V! i/ a6 @
- the end:" T3 i" n! A3 C
- ---cut here---0 x! |3 C0 B7 `
- [DBEXPRESS]. M1 Y9 ]: Q9 @& E. |
- sqldir=mysql_sql. ~/ S7 E! n, P2 |
- Drivername=mysql& B/ f/ r9 P& c. S" c- T k! L( R
- Database=Your_Database_Name_Here
& ?/ j3 |: |' t a) N - Hostname=The_PC_the_MySQL-Server_is_on" {: w8 J0 z! F( h; Z
- User_name=User_name_on_the_MySQL-Server+ [* Z; f1 L5 K5 C$ \
- Password=Password_to_go_with_above_user_name
- F t4 D+ i% E% | - GetDriverFunc=getSQLDriverMYSQL+ c. L: h+ f1 E
- VendorLib=path_pointing_at_your_mysql_vendor_lib9 G3 f8 \7 c* ?2 I
- LibraryName=path_to_libsqlmy_libary- _$ r+ ~3 @ ~: B" v- K" h9 Z V
- Active=1
2 P; m' F/ Y5 o4 o+ W - ---cut here---3 P; d' r$ i; r. y% q
- In my environment (a linux box with a MySQL server running locally) I have:3 C, c: g! d4 d) C( E/ O9 d
- ---example---9 b: v9 r3 H; c' t" I$ s: p
- [DBEXPRESS]
0 y0 y) C$ |$ P8 A' X. y - sqldir=mysql_sql
* Y/ k) C+ n- J: r% f - Drivername=mysql
9 L) I8 ~; k8 p% ^% F - Database=test) Y: A6 U! D6 q) _5 x" ^! k
- Hostname=localhost
6 L% j' W- q7 f - User_name=testuser
7 ]# [3 W) v) Z5 L2 y! I/ L - Password=my_password% n' Q4 j' H5 E& |2 I
- GetDriverFunc=getSQLDriverMYSQL, Q3 J4 p5 }+ K5 c# ?1 }( ?
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 {5 L8 H! C7 o- }
- LibraryName=./libsqlmy.so6 D4 H! ?* A! z3 E0 v D5 B
- Active=1
. _9 x5 r3 u- o2 e; p% R - ---example---
5 k+ Z" V M) K2 \" J - * Y ~1 G6 V& d: J4 m
- On a windows box, also running the MySQL server locally, it would be:
3 O' h. n0 c: v. G. c( i - ---example---' ~' ?+ e3 o& ]$ @# G" m
- [DBEXPRESS]6 g# b. n" j- {, [$ E8 m5 W. m+ i# A
- sqldir=mysql_sql! ^) O2 n+ D/ y% W# s* q' {' G
- Drivername=mysql0 m. ~* z! D; |' V, |5 J% x; ?
- Database=test
5 H5 Z' j) T0 _; \ - Hostname=127.0.0.1) o" @& Z' M; Z% J
- User_name=testuser0 y) z: D/ P- o2 M7 \
- Password=my_password
, P' G7 _# X/ H! m/ H! w# m - GetDriverFunc=getSQLDriverMYSQL! @1 X- m, [1 o: A0 n3 V
- VendorLib=libmysql.dll
; I/ c- P+ R5 u! T' p - LibraryName=dbexpmysql.dll
9 N& T9 M, v) J" N( {. z - Active=1
\8 C1 S2 Z) J% c% `+ X1 x0 k - ---example----
6 f4 A: ?' Y6 m/ p - - written 02.03.04 by pwk.linuxfan/ h# G: \0 l% E8 K
) r, C" B3 ]0 }! O- n5 r0 J
复制代码 |
|