|
|
麻烦翻译一下,下面这段文章:xhan ; X0 x2 b6 g4 C9 x
. `! r: j/ b4 k1 N5 ?3 c' c4 x
-
" X9 T: I$ I; k1 c& _/ j2 B; c! m - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ `- t0 C. Q& D
' Y" u- M! n; b$ O4 B8 K+ T" y- ### What we need ###
( I5 l' s6 x% t7 A - Naturally, we will need a MySQL server to store the data for us, this document
( }8 N/ @1 q. o C- V, K2 q - will not explain how this can be done - there are documents out there for the & w0 u- m1 v$ ]9 L: M% G1 p: Q* X# z
- interested. The requirements include a (empty) database for TeamSpeak to use/ S9 r& l. V( I; Q) W) g
- and a user account (username + password) that has the permissions to do stuff
) Q0 h4 l& p* { - with the database. Additionally, you will need a vendor library installed on the
# W, C2 |3 C' e - local machine, this came with my MySQL install.% ?! N6 \- p9 d1 ]
- These instructions will not tell you how you might transfer your data from the
9 T! w( ]( t1 V$ [: z/ I - SQLite database to the MySQL database, we start with a clean and empty MySQL5 S- u* i$ \' @6 X; v- r3 F" d
- database.
) O; }8 \2 G, p, a1 J - Some users have reported ways to import a SQLite database into MySQL, but at
7 e7 d# v) W- t! \ - the time of writing, there are still too many issues - check the current status, d, V6 B5 |6 i4 w; `6 W4 Z0 z
- in the TeamSpeak forums if you are interested.1 g% ]+ N; \1 B& x
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 Z5 c, b, O8 J! b, ? - Borland was used. This driver can only interface with the client library that
" S( v5 G7 S/ C. _, z/ [ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 u% H: h% G4 u. L2 X" |4 R5 Z
- client library - basically all you have to do is to use a 3.x client library as 6 f' g6 t6 l2 d$ t5 ~
- "VendorLib" and a 4.x database to connect to.
, r. W$ F) A6 w4 c1 h/ \ - If you need more info about dbExpress, you can contact Borland.
& X( Q' [; ]! X$ N! x - . p/ |0 c" ~* @# \. ^3 ]
- ### Doing the work ###) R( ~8 q, y- W, \4 Z* l: w- P
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
1 L) q, }; }) i - the perquisites right, just open your server.ini file, and add this section at
) @4 P/ P+ e( }+ _ h0 D - the end:
' e. h( H: [; j+ x6 L - ---cut here---6 f9 _+ H; C6 g0 I7 d5 z
- [DBEXPRESS]
9 w# R# [" P) B' u - sqldir=mysql_sql/ q; T$ |* Z( _& S h
- Drivername=mysql
; z) A$ g1 v; g8 P- J; V - Database=Your_Database_Name_Here
* T. Q' ^1 g/ ]5 ~1 g - Hostname=The_PC_the_MySQL-Server_is_on
% `+ \9 l- H- Q9 d4 e' U5 |& n - User_name=User_name_on_the_MySQL-Server% w6 R. C& z2 Z/ J+ a, h
- Password=Password_to_go_with_above_user_name N3 \4 O2 A. {
- GetDriverFunc=getSQLDriverMYSQL
* v" g& U! J9 s6 \! x0 h - VendorLib=path_pointing_at_your_mysql_vendor_lib* V9 ~' m4 s' g/ Z% v
- LibraryName=path_to_libsqlmy_libary6 i9 P v' Q) A
- Active=1
% K, v6 N- d" D+ b+ J. s: A% x - ---cut here---
# b7 A! q, o2 p: b: N/ o - In my environment (a linux box with a MySQL server running locally) I have:
$ G K# R5 J+ ?2 T/ \$ s9 l - ---example---
0 {" {2 s8 ]2 B: K7 D! c1 x n - [DBEXPRESS]0 V4 m& ~; f: ~* v, _/ Q
- sqldir=mysql_sql
4 D& O1 Z; a5 Q: i - Drivername=mysql
/ d. _1 ~& u2 I% a% Z5 k - Database=test9 S7 n% h' w2 n" B2 z
- Hostname=localhost7 `- S4 x3 o7 m
- User_name=testuser
$ q. i& B9 Z# w - Password=my_password
1 a+ ]5 i( ^' ~' R - GetDriverFunc=getSQLDriverMYSQL
/ E/ A/ ]/ X* M; i2 `- o! d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 {# V, @) S! K1 K3 Q9 L - LibraryName=./libsqlmy.so9 L3 M( c* {' i' W1 V+ a7 v, X
- Active=1& W' f* y8 k! O* R7 W, m8 ?
- ---example---& u" B) W1 V8 x# {7 Q
9 T- x* l7 Y: k5 l( P- G9 K+ H4 c- On a windows box, also running the MySQL server locally, it would be:
( ?4 k7 f( x9 F% |) Z; ` - ---example---
; j) Z% }9 |( ?3 z$ S& W/ G; U0 _# } - [DBEXPRESS]0 \( E5 [: M/ L6 q1 x/ V, U
- sqldir=mysql_sql
1 Q# {, T# r9 ^, _; Y( I4 {* L - Drivername=mysql1 _1 b* l. i3 K+ R' i) L% l2 a
- Database=test
& k; f. b, f+ p0 Q) W# p$ h$ S# u - Hostname=127.0.0.1
1 w5 v; d9 t5 Q: ]9 J" { - User_name=testuser
1 ^7 t: C# N- {( ?8 n# I - Password=my_password
5 x( f- p$ `( x# U' D- v - GetDriverFunc=getSQLDriverMYSQL
9 N% _3 A+ K! C8 o7 L. S) |! U - VendorLib=libmysql.dll6 i) e1 B) x v0 E4 h1 R
- LibraryName=dbexpmysql.dll7 y& _/ ]% Z" U( f; w
- Active=12 o8 h( e+ x/ }0 ?; P
- ---example----) [6 J! F$ T+ k8 U
- - written 02.03.04 by pwk.linuxfan
) P' I% L5 ^8 _. | |* H, l! k
0 e: I8 d# ?1 |$ U7 D; w. b
复制代码 |
|