|
|
麻烦翻译一下,下面这段文章:xhan
' _/ c) R8 i; k& l, l( B, s# C/ @4 U- P; A$ _( N7 b5 Z& B
-
# Z& w/ w! c% l; ~ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
- n) F* ?" V' i9 ^! s, h) L7 s/ J - ( u% H# e4 Z$ B, s: _* D6 T2 a
- ### What we need ###
3 i; {. S5 C* I& x. }7 p9 b/ H; u - Naturally, we will need a MySQL server to store the data for us, this document
: {2 S$ h$ R$ l; ] - will not explain how this can be done - there are documents out there for the
" \5 E8 l$ o" @5 T ~ [ - interested. The requirements include a (empty) database for TeamSpeak to use
5 F, k T5 t4 q% ]' p& r - and a user account (username + password) that has the permissions to do stuff
/ x6 P0 T+ W. ?9 M - with the database. Additionally, you will need a vendor library installed on the
# d! d4 z$ k6 f - local machine, this came with my MySQL install.+ H! X" @ m( t8 Y# f
- These instructions will not tell you how you might transfer your data from the
+ N1 `# `) ]7 F$ s3 V% I+ R - SQLite database to the MySQL database, we start with a clean and empty MySQL; V" J7 G8 q2 O% f# B3 i( }, q7 E
- database.' u( \" X, k1 F6 p x) n* [" k
- Some users have reported ways to import a SQLite database into MySQL, but at
$ e( L! c+ P9 v& n - the time of writing, there are still too many issues - check the current status3 T I, m) h6 @" S: D: t
- in the TeamSpeak forums if you are interested.
) m) H8 Y. K1 q5 I0 P; P2 e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, L3 S6 x' ~, x6 h - Borland was used. This driver can only interface with the client library that
4 r2 s* s+ y+ L' J4 c6 y( \1 D - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this n2 K& i* { @$ A
- client library - basically all you have to do is to use a 3.x client library as
% F0 m4 L9 E1 C7 z+ W2 B1 o - "VendorLib" and a 4.x database to connect to.2 k8 b$ [: g$ D! N( ]9 c, {
- If you need more info about dbExpress, you can contact Borland.
; n5 K2 L, {+ X) k9 `" q
7 q0 Y% Y! `+ Z7 k- ### Doing the work ###
% X' J# |9 E) J - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( }% B- c/ k u6 F- v$ l, b5 Y - the perquisites right, just open your server.ini file, and add this section at
5 B& w* d, K* | - the end:
4 e5 p9 \5 D, u5 B - ---cut here---: y( u8 [8 ?9 y. c' G, D1 y$ c
- [DBEXPRESS]3 b6 Y$ u- J6 q! Z9 H4 I @" }7 E
- sqldir=mysql_sql0 W3 g0 ^: \/ c' m1 P9 {
- Drivername=mysql# X! a |# E( {
- Database=Your_Database_Name_Here
6 v) \3 y7 N7 r" E5 y4 J7 n - Hostname=The_PC_the_MySQL-Server_is_on3 z" O$ a ]( D1 o. {' }9 V
- User_name=User_name_on_the_MySQL-Server$ `7 N7 \# J1 |0 ?0 f, {" i
- Password=Password_to_go_with_above_user_name/ Z# x% T$ o. ^" w' _
- GetDriverFunc=getSQLDriverMYSQL
0 w; j7 j1 L$ W# v4 K - VendorLib=path_pointing_at_your_mysql_vendor_lib7 a' q% d3 F$ M" B
- LibraryName=path_to_libsqlmy_libary! ?5 z; ^5 e% X' \8 |
- Active=1
! ]' w- Q4 U/ l/ I9 S; k* b - ---cut here---" ^% t6 X$ `) b
- In my environment (a linux box with a MySQL server running locally) I have:
8 h' ~- l8 R) u- s6 J- I# Q - ---example---
6 |- ]2 e2 W$ }5 @, A2 a7 f% _ - [DBEXPRESS]
, K; u5 p. C i3 ? - sqldir=mysql_sql8 D) r+ w) D9 N( H# [6 Y5 v
- Drivername=mysql# L9 ~, f' v6 ?, Z' b& u1 ^% K
- Database=test; z8 E/ T$ C1 p) n
- Hostname=localhost
$ _% Y4 @7 u% s" B; f$ C - User_name=testuser0 ^7 j$ l/ ~( E D% L
- Password=my_password% c( s$ l$ d" n# W6 [
- GetDriverFunc=getSQLDriverMYSQL
8 A2 P8 X( J7 I9 |, {3 q1 K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0+ m3 o# z# C L4 E; ], h2 ]3 n
- LibraryName=./libsqlmy.so: e; c6 O R! B* ~2 Z# z
- Active=1
2 l# e2 }* G S$ E- h/ J - ---example---
5 B- ]9 n+ s* K% y5 [: O# b - ! l$ | t+ m; W$ } A6 k$ l
- On a windows box, also running the MySQL server locally, it would be:2 [2 J- r6 I. f( ?1 n- z
- ---example---& x7 A* d" |( G% r3 ~0 M5 ^
- [DBEXPRESS]' y; K2 P+ V; w! D+ Q1 a4 W1 S- u
- sqldir=mysql_sql
/ ~4 | `9 w8 x ~ - Drivername=mysql
. ?7 L# T8 C7 U; \& V - Database=test" k5 q8 A, b- m
- Hostname=127.0.0.1
% j* L' i% s; ` - User_name=testuser5 t0 e' o& E. ~8 U( {! A
- Password=my_password+ A# B( w6 S9 H* }& f
- GetDriverFunc=getSQLDriverMYSQL! t" ?, t6 J, \
- VendorLib=libmysql.dll+ Z& q' H& n- m) A+ L# S. }
- LibraryName=dbexpmysql.dll
' t2 O3 V5 l; t0 s - Active=1$ w" V1 i7 t" z$ r; ]2 J
- ---example----5 ?, `- [2 C$ G" W8 _) V; @
- - written 02.03.04 by pwk.linuxfan
+ f; C% M" p' x/ A" ?- f - . @; Y* C4 T5 \8 P4 D4 x$ ?
复制代码 |
|