|
|
麻烦翻译一下,下面这段文章:xhan 8 M( V" v1 m' L4 n
$ m0 i4 ~ @2 i* N, p" ?
-
) V3 S) |* p+ R. I - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& x: m$ P# D# |$ x$ \3 B {- U - 2 c# A. a3 m4 t3 e3 y
- ### What we need ###
) G1 P; j( l! s: G. B# M+ L5 `% C - Naturally, we will need a MySQL server to store the data for us, this document ' L! R: h) K$ I: t
- will not explain how this can be done - there are documents out there for the , ^8 q4 y$ M" A
- interested. The requirements include a (empty) database for TeamSpeak to use6 N4 h! K6 N3 `% H0 j
- and a user account (username + password) that has the permissions to do stuff
8 [3 P# T. i+ H: x" ~9 c4 X& R - with the database. Additionally, you will need a vendor library installed on the
, Y" x3 {5 W0 B* Z! X3 l% I& K - local machine, this came with my MySQL install./ q1 ] B5 O5 u6 u" W
- These instructions will not tell you how you might transfer your data from the3 T4 e: G& x! T8 k m" T# g
- SQLite database to the MySQL database, we start with a clean and empty MySQL
) q3 B- v; a; P$ P - database.* R& j0 o9 w; F6 q, C
- Some users have reported ways to import a SQLite database into MySQL, but at5 I+ X# F& ~7 e. t: @% }
- the time of writing, there are still too many issues - check the current status
# I' @+ q# C+ z* f& M: ]' r7 ` - in the TeamSpeak forums if you are interested.# M7 |1 F1 q) U: E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 h: V& o9 N/ ^4 ^& e, y2 w& C/ K2 f - Borland was used. This driver can only interface with the client library that & A' V8 c6 D6 h# y: O+ u/ L$ y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ }, _' v( E( b
- client library - basically all you have to do is to use a 3.x client library as 6 e7 x8 U' R# c3 W2 t
- "VendorLib" and a 4.x database to connect to.
" F! b: W+ k+ D$ S, J/ \5 k - If you need more info about dbExpress, you can contact Borland.
6 E0 Q% w6 [2 i* \0 q& {6 o4 O( P$ t
% V' j1 n7 T+ H. N/ v- ### Doing the work ###, B9 d4 Z" I" e! o5 N
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 h2 j3 `& c1 v- i2 L4 R - the perquisites right, just open your server.ini file, and add this section at
2 N! t+ A' B% u, D- b - the end:
. M S' F, u8 f - ---cut here---
/ c: C. z# A* j. W3 g; E - [DBEXPRESS]
" d: S+ Z4 f5 p1 G) ^% a# [' ^3 u - sqldir=mysql_sql
$ E. j h/ V6 `, h% m - Drivername=mysql4 b" D$ N/ I2 Y4 R6 T9 w: O
- Database=Your_Database_Name_Here5 M* }% f5 b7 y c! p6 ~
- Hostname=The_PC_the_MySQL-Server_is_on% e6 f+ Q# p0 d5 B9 y4 i
- User_name=User_name_on_the_MySQL-Server
' i) M" o- J, o$ i) n+ z/ K& P, H7 E! J - Password=Password_to_go_with_above_user_name, J% a! Z0 b/ e* J6 w, p; C
- GetDriverFunc=getSQLDriverMYSQL0 @# Q/ X6 g. Z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 R; c8 F1 Q6 I4 ~/ L# ~ - LibraryName=path_to_libsqlmy_libary6 m/ T+ ]+ j3 P$ {$ k8 Y9 j
- Active=1
/ I( ]; A4 v" C9 L8 g$ O8 n - ---cut here---
& ^; W3 g' P5 `/ S9 i y - In my environment (a linux box with a MySQL server running locally) I have:6 o' q4 {$ H/ R: F2 X3 }
- ---example---: U" B: p, ~: t0 {' p0 P5 b/ o
- [DBEXPRESS]
/ j# S) Q7 ^7 l- u) M - sqldir=mysql_sql3 N0 m* S) z) T: k& u3 t0 y
- Drivername=mysql
( Y, u, ~, e6 k8 W8 W8 i" r - Database=test
4 |% n% B1 b) a1 F9 {! I4 h1 X; R! Q - Hostname=localhost
3 v" k) d* B6 P, x) ]0 V# L4 U9 k - User_name=testuser
v5 W* ^( r2 x7 G4 a" \ - Password=my_password
: T% x+ p- O; E3 ]( d6 w - GetDriverFunc=getSQLDriverMYSQL
: m0 n! C; J& ?# j5 a - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 s+ R4 S a4 a, i9 K4 Y1 W% o - LibraryName=./libsqlmy.so
2 T# s D/ n/ [: |' A# P5 m - Active=1
# {) R$ V, d1 k - ---example---
; o+ N" `* _% f7 E. P2 D8 C4 d
! ?+ q) y* h: m7 w' j- On a windows box, also running the MySQL server locally, it would be:
( ?: e/ L/ y7 E+ Y; e; [& j - ---example---
' c! ]+ O- |) z9 F9 ?& f v - [DBEXPRESS]
+ X# x, o: w8 _) n; M+ U - sqldir=mysql_sql
( [6 c5 _ }) g9 E3 M' U! q - Drivername=mysql4 Q! q% b: U; {' @ ?, _
- Database=test
6 Q! Q/ ]# y! l4 s( } - Hostname=127.0.0.1
" g# M% ~8 I- i) v7 h - User_name=testuser
# Q& C$ N' i) D8 p. v/ q( X5 y - Password=my_password
+ ]& }, k- y/ A - GetDriverFunc=getSQLDriverMYSQL! F! V- T5 c) s: t6 B. _7 x
- VendorLib=libmysql.dll
* X1 ^% I9 r; N1 t2 r& p% Z - LibraryName=dbexpmysql.dll
3 G, r4 c3 S6 Y! @; O3 |# E - Active=1! v$ d$ l, C6 ~ t% r
- ---example----
, B R8 _' B, X- F$ _7 o9 K! p8 W - - written 02.03.04 by pwk.linuxfan m$ w2 I: e+ ?/ v- ]
# P' D6 c, {6 O; b9 X+ _* _
复制代码 |
|