|
|
麻烦翻译一下,下面这段文章:xhan
$ a" J! G, _1 @7 I* M
3 V! b* k+ @) q0 u+ `- 4 }3 n, y& ^, c, M
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# B# o5 ^, l# R; v V V$ B+ v# D
' H) X: d% y2 w5 c- ### What we need ###
1 ^3 Q/ `9 {9 h# h# c4 x - Naturally, we will need a MySQL server to store the data for us, this document % U% F# x; D5 h
- will not explain how this can be done - there are documents out there for the
: S$ E! G5 b4 E - interested. The requirements include a (empty) database for TeamSpeak to use
6 a) J; e. v) K% @' h - and a user account (username + password) that has the permissions to do stuff
5 I% e2 I- h" }- L, J4 q - with the database. Additionally, you will need a vendor library installed on the4 W# l) } H) M3 g
- local machine, this came with my MySQL install.8 k# E& `$ Z2 g# F
- These instructions will not tell you how you might transfer your data from the
8 \( p. U8 W9 M) P; G/ n { - SQLite database to the MySQL database, we start with a clean and empty MySQL
# H6 J4 Q: y3 {) u; ] - database.
% O' U! B, a4 y7 J) O+ P5 ^ - Some users have reported ways to import a SQLite database into MySQL, but at
" R; ~) H7 R* }2 V) P0 o/ e9 K. c - the time of writing, there are still too many issues - check the current status5 W1 k* h& e" E& _0 H q* z
- in the TeamSpeak forums if you are interested.
4 ^( [% U/ }: i" Q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ c+ D/ _4 c. D% ]- f4 N4 V - Borland was used. This driver can only interface with the client library that
* B" V0 r% S) Q: o - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 U& @0 \% U5 H - client library - basically all you have to do is to use a 3.x client library as / f# z; n, O3 ?% d
- "VendorLib" and a 4.x database to connect to.: U" N8 S2 ]) j
- If you need more info about dbExpress, you can contact Borland.
[- S( u0 h$ S( n& G- n
: z$ U' F& U! x! p1 ^! _6 [- ### Doing the work ### D; F6 U6 Y9 h
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 V: o' Y0 N' M% N3 r - the perquisites right, just open your server.ini file, and add this section at
2 e% R# c9 m" d% ~5 t C$ w - the end:0 T2 N8 ?2 j+ ` r, g
- ---cut here---1 G# ? V9 h" B) U- J
- [DBEXPRESS]
$ S7 U* O7 F! M. p5 s8 d7 m - sqldir=mysql_sql
& K( Z5 _ i; z$ C5 K/ E& u5 ? - Drivername=mysql
+ A; i3 m. B# E9 {" L0 h8 K - Database=Your_Database_Name_Here. s3 c# y/ m. X" [% I$ B
- Hostname=The_PC_the_MySQL-Server_is_on
# a$ x6 S U9 M5 W* E. c - User_name=User_name_on_the_MySQL-Server
" i3 A" [& @6 a1 z' L+ w0 R) b# p8 Y - Password=Password_to_go_with_above_user_name
5 g/ I4 M9 t2 u4 x" T - GetDriverFunc=getSQLDriverMYSQL# L: @3 F) p. Q7 k" |) w8 N, e
- VendorLib=path_pointing_at_your_mysql_vendor_lib/ f8 z) S- Y7 F% X% @
- LibraryName=path_to_libsqlmy_libary X( \; C7 G' a% G0 u4 h; B
- Active=1- S( _% ^( O- @& W, x- |2 H$ c& O* {
- ---cut here---
# Z$ |) x$ f$ b0 u( k - In my environment (a linux box with a MySQL server running locally) I have: J5 N. F( W, j4 w
- ---example---/ c6 r- w+ ]$ Z# S4 r/ g) b2 Q
- [DBEXPRESS] _( o) s6 l2 G' y+ q; v# U3 q7 m
- sqldir=mysql_sql
$ {/ K& x+ w" @, b, D - Drivername=mysql
& [2 T$ x- W% | - Database=test
3 c; n; w* \5 {! C& o - Hostname=localhost
( U) o, O* o& Z8 ] - User_name=testuser1 [, U+ [8 {9 w: L
- Password=my_password" c1 ^. w2 j$ w0 q4 z- @4 w
- GetDriverFunc=getSQLDriverMYSQL ~' ~ @4 t( k6 x6 I
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ a; h/ S4 }0 e9 c8 |% k }: R - LibraryName=./libsqlmy.so
: ` ?, V6 f2 \( p, A8 W - Active=1
! S$ v: b. t' c4 K& C - ---example---
& Q* l! v9 f" C7 X! a6 n, X3 n5 ] _
$ Q0 ~6 n P: Z) a- On a windows box, also running the MySQL server locally, it would be:2 G# E1 m. u" q' f2 G: X; F. U, F
- ---example---
" ?: p+ E$ y$ Y" j; `! p7 v" o - [DBEXPRESS]
4 M. \$ [, ?: ? - sqldir=mysql_sql
% G- M; o5 G; p& m/ B; x - Drivername=mysql' S0 ]! _3 i, P0 Y5 s+ R! z$ }. @
- Database=test! {- z( [; p7 V3 U e! W
- Hostname=127.0.0.1& K w3 A) Q0 U8 @# ]. ^1 y* c
- User_name=testuser
; b* K) Y+ [9 R1 c - Password=my_password
' C1 ^+ X; v3 Y2 D; I4 h- c - GetDriverFunc=getSQLDriverMYSQL, d! v, }! a2 D3 G* n8 D
- VendorLib=libmysql.dll" W' ?+ \7 v2 h
- LibraryName=dbexpmysql.dll. ]2 u3 M, A0 d' c# D
- Active=1; ]4 w* g6 ^; d9 n% O
- ---example----' c6 Q& H' O4 q: I; b1 L
- - written 02.03.04 by pwk.linuxfan
) E! |6 l+ |" t2 O* v( Z4 H* m
# i# i$ _+ w; J2 |- H( L
复制代码 |
|