|
|
麻烦翻译一下,下面这段文章:xhan
/ c! O# C7 ~ r2 m7 {: M# c/ ^$ t2 U
' z1 x/ E5 [3 Q9 Y-
2 I: F7 \- P" O. i - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 H- N6 X; `2 Q. A0 ~' `# S
, }, u- l9 T: i4 ^8 f' D( k- ### What we need ###
1 h2 e) z# N% L' F7 ` - Naturally, we will need a MySQL server to store the data for us, this document
' ]- j4 g8 A7 W' X; ?. P1 ]5 d9 x; Z - will not explain how this can be done - there are documents out there for the
2 Z& s+ X: A, k8 l* G - interested. The requirements include a (empty) database for TeamSpeak to use
. l% h1 R0 M; q6 g% d( C - and a user account (username + password) that has the permissions to do stuff
' n: ~5 M4 j1 ] - with the database. Additionally, you will need a vendor library installed on the
9 X, O, f8 G# M" u1 ]: Q8 v& ~! U - local machine, this came with my MySQL install.* g4 g& b# O, h1 A+ v! o4 T
- These instructions will not tell you how you might transfer your data from the7 q# d3 M( B t2 u% j2 S, G
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 ?( W% M! j- U F/ |, a
- database.
1 G$ }% S; z! H/ S - Some users have reported ways to import a SQLite database into MySQL, but at( n8 c0 Q) Q# D" L5 P3 R
- the time of writing, there are still too many issues - check the current status
' O$ y, r( h3 @6 l o6 p - in the TeamSpeak forums if you are interested./ R4 w0 N+ j* @. w
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( Q' ~" o& B' d7 }/ v
- Borland was used. This driver can only interface with the client library that ( y; y8 ]% A+ u2 g' r5 Y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this& w, S: @7 H9 p' q
- client library - basically all you have to do is to use a 3.x client library as
- r3 i6 ]" J# w$ k/ @7 Z% e - "VendorLib" and a 4.x database to connect to.( W' u; r8 I. k& Z D
- If you need more info about dbExpress, you can contact Borland.* i. }- ~2 |$ d6 o8 ~7 E! H8 u& c
* `2 A, H3 I& W& h) C$ f- ### Doing the work ###5 R1 A* E2 D, a4 T- Y$ @
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 G* P4 d1 y8 _) Z# \3 c - the perquisites right, just open your server.ini file, and add this section at- i& ?4 m1 l" m; t
- the end:+ W+ e0 G' u# x$ P- T6 ^
- ---cut here---* I$ g9 I7 l K$ `. {# B
- [DBEXPRESS]; j/ i+ V" r1 t$ d1 k- X
- sqldir=mysql_sql
1 N C3 O, Q8 {! | - Drivername=mysql
$ _# Y; x/ M' G0 S3 M - Database=Your_Database_Name_Here
4 `* r }6 c0 m0 F7 G3 E f - Hostname=The_PC_the_MySQL-Server_is_on. f# X0 E7 m4 D* R
- User_name=User_name_on_the_MySQL-Server
6 F" ?& J) C, e9 ~9 _ F - Password=Password_to_go_with_above_user_name
) X' e0 ]/ X- ?$ d( M - GetDriverFunc=getSQLDriverMYSQL
0 \3 n! D$ H9 w( ? - VendorLib=path_pointing_at_your_mysql_vendor_lib
& l) i$ p, K9 g! T; h; h8 ^$ P. F. { - LibraryName=path_to_libsqlmy_libary7 C3 F6 ]/ w8 b% P- p/ i
- Active=1
/ {+ }' G' f4 a6 e# v - ---cut here---
6 {$ g. Q5 L' d A - In my environment (a linux box with a MySQL server running locally) I have:- z S1 H- f' f3 V
- ---example---
& D9 f1 u+ [) K# z, A. F - [DBEXPRESS]0 N5 A- Z+ H& X d+ [
- sqldir=mysql_sql, E* b4 u$ {* k+ I
- Drivername=mysql
: s O5 p* n) E8 [, ` - Database=test$ v7 h, W- P8 c# { G0 R
- Hostname=localhost. D! d& T0 h) v0 ~ ^
- User_name=testuser: `/ E& s; k5 U9 l! v
- Password=my_password$ x a6 ]1 O+ J) n8 [
- GetDriverFunc=getSQLDriverMYSQL
1 x# H% q4 o; i5 q+ A( [2 | - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. C" U4 N& I' l$ J
- LibraryName=./libsqlmy.so4 G* _& ]7 F F/ ]2 b. p& |
- Active=1
0 S; |8 {& I' W# C' U - ---example---
# `0 s ^9 ~4 \/ e# E - * \5 q8 w. y+ E7 C4 y" ?
- On a windows box, also running the MySQL server locally, it would be:
3 Y5 E8 J( O% A. W0 E% o - ---example---5 {% @, B* O' N6 G d
- [DBEXPRESS]
' j% F) @' r1 R/ v - sqldir=mysql_sql
* k5 A1 M" h. l$ ?2 L - Drivername=mysql: \* ^4 n4 n! T7 C/ `
- Database=test( p) r, L' L: `1 k$ W0 f5 O# `% ?* ~
- Hostname=127.0.0.1
% Y K. m; B7 U1 }5 a - User_name=testuser& B: o4 `( r* A$ Z3 ~ N
- Password=my_password0 e# p7 C+ o6 z
- GetDriverFunc=getSQLDriverMYSQL* \0 O! Q l4 z6 ~6 ~/ c, O
- VendorLib=libmysql.dll1 f8 D Y6 y% J: `* \
- LibraryName=dbexpmysql.dll
$ H3 P7 h7 h1 v% V# m - Active=1/ C, H; e1 \5 \+ e3 u6 v- D
- ---example----
$ s3 W' j3 w- _- X, M0 f - - written 02.03.04 by pwk.linuxfan/ E( V8 n' N4 M4 s. k, ]$ A
- - \7 H% Z4 B" f: d8 f* I0 t$ x
复制代码 |
|