|
|
麻烦翻译一下,下面这段文章:xhan
% A: h" d! k2 u, l8 {' v; e6 H
$ f5 S' x# S2 ]+ y/ E$ A- ; T$ g5 ^) k' J4 ~
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ ]" A8 e) _7 ~, [
, ]9 j1 {* r0 m* u- ### What we need ###0 d3 O1 A+ x. ~8 J' w- V
- Naturally, we will need a MySQL server to store the data for us, this document " w& E9 o( h B9 Q. D" s, u! P1 Q
- will not explain how this can be done - there are documents out there for the / u! p5 \) c; g; [6 R. _( c7 y& i- [
- interested. The requirements include a (empty) database for TeamSpeak to use
5 U/ S D5 h5 _+ u2 E; p' S, u - and a user account (username + password) that has the permissions to do stuff7 }/ S4 }5 ~( P/ F0 r
- with the database. Additionally, you will need a vendor library installed on the( A3 w4 D" X3 i0 l7 j
- local machine, this came with my MySQL install.
$ x( A" b4 P& V8 u - These instructions will not tell you how you might transfer your data from the
, \ c& v$ t! m% f* c - SQLite database to the MySQL database, we start with a clean and empty MySQL
; ?4 C* a6 R, J3 @! p - database.
& Q7 Z9 i" M2 R - Some users have reported ways to import a SQLite database into MySQL, but at
1 a% ^" J8 a* m/ z9 h; K - the time of writing, there are still too many issues - check the current status% w3 ^' ?! M2 y$ B9 T6 s
- in the TeamSpeak forums if you are interested.
' v. S4 C; H R - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. w% K) E0 U; Y8 P' d( f/ j
- Borland was used. This driver can only interface with the client library that
: _: o( j# D# N9 T. n0 n - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" t S1 `' w3 r
- client library - basically all you have to do is to use a 3.x client library as
3 W) F5 B+ K+ \( ]6 S - "VendorLib" and a 4.x database to connect to.
: B- f+ M7 T8 y - If you need more info about dbExpress, you can contact Borland.! Z7 \3 ]; r8 i
( Z7 |6 E3 C. D- ### Doing the work ###8 ~4 P4 c+ s3 ?# G
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ I# T8 |- {) b. ?& C
- the perquisites right, just open your server.ini file, and add this section at' `, ~8 o" w, }' P& T
- the end:, p. i& P A- o: [1 d
- ---cut here---
1 Z% G( N8 q$ G - [DBEXPRESS]$ }5 C3 a, ]3 \( g
- sqldir=mysql_sql
/ C& ^0 N8 [$ w* N - Drivername=mysql
@3 c' M a9 Z( m - Database=Your_Database_Name_Here5 ~" ?4 O6 y+ j Q" |# ^
- Hostname=The_PC_the_MySQL-Server_is_on
4 M. M! B, R2 ^: E; E1 Z. x+ R; J! T" h - User_name=User_name_on_the_MySQL-Server
5 Y8 P# o3 a+ b' q3 |* } - Password=Password_to_go_with_above_user_name+ g# h. j7 T$ x8 r7 v
- GetDriverFunc=getSQLDriverMYSQL0 E. H5 s* ^3 w N( m
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% g9 |8 m( Y. i+ E3 T; ] - LibraryName=path_to_libsqlmy_libary
; W: y0 h5 f6 p* S6 R - Active=1
: N4 s4 t- ?: p$ c: v% y* @' t - ---cut here---% l: k& I* [# o' w# p
- In my environment (a linux box with a MySQL server running locally) I have:
% Z4 V8 F: ~/ K% P* W: R - ---example--- k) ~& n- h; ]
- [DBEXPRESS], p6 p5 x7 t& L
- sqldir=mysql_sql7 F9 v# U0 i- _, ^8 H- z
- Drivername=mysql
$ L2 `$ r# O P: Y4 |5 V6 W - Database=test4 y8 _( n N+ e) c) y
- Hostname=localhost f1 Z) @0 v* r- a& C$ `
- User_name=testuser, I9 l* }% l. ] T* Q/ y4 R
- Password=my_password/ f% ]: p# d0 I* ^% T
- GetDriverFunc=getSQLDriverMYSQL4 G5 i& E. Q. S- G2 \
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0: b- ^" b. m, p
- LibraryName=./libsqlmy.so2 ]# L0 L! s- x s: u; P
- Active=1
$ d, c- J" ^) a' c - ---example---
. [( ^( D% R- y' l& y1 e# {
* J r1 n2 j2 E- On a windows box, also running the MySQL server locally, it would be:
- K2 l2 D8 `, f& _ - ---example---+ w5 l2 M: @- U$ U
- [DBEXPRESS]
) d. n F0 g0 _$ X7 [ - sqldir=mysql_sql& A8 [7 n* E+ F& [. U4 B8 \
- Drivername=mysql
8 y4 O* ]! I1 O2 R; r M - Database=test
/ x9 q# c! Y* E2 m, @ ?. F - Hostname=127.0.0.1
% @/ [( @8 f# @. l9 B: N- A - User_name=testuser
0 f* k* O8 Q, l' P2 m6 V - Password=my_password$ T" u. _% X' }% L/ }" T
- GetDriverFunc=getSQLDriverMYSQL
' }3 P$ ?' x+ i" p( m1 l$ V - VendorLib=libmysql.dll
1 Y8 q" }5 j$ C1 F, d! i5 k - LibraryName=dbexpmysql.dll* S( g2 L. M n
- Active=10 t/ A2 @1 z% j- w: V8 V3 v2 T
- ---example----
6 l& j$ Y' @; u' ~# O - - written 02.03.04 by pwk.linuxfan
. g& d w3 O! R* y: v - ' Y# W2 n$ k5 _
复制代码 |
|