|
|
麻烦翻译一下,下面这段文章:xhan $ L/ H8 O% K9 a! w& B
2 q- D& m6 d. s! I4 s9 h
-
) g1 P. b6 ]0 w! H - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# o$ O1 _8 B5 l( ?
- z! O6 X [' R. d* n. P- ### What we need ###! K' d! J1 B7 f/ p' K' w
- Naturally, we will need a MySQL server to store the data for us, this document ! R. v, T# w3 p; O2 N: X$ z, s3 N( I
- will not explain how this can be done - there are documents out there for the
3 Y+ N4 B/ w% k0 L! `& x - interested. The requirements include a (empty) database for TeamSpeak to use
1 N2 _7 A3 U# k) ^8 J! f - and a user account (username + password) that has the permissions to do stuff) E, x4 J& v0 P8 [; F
- with the database. Additionally, you will need a vendor library installed on the
4 S* I" M, W- G) c5 f - local machine, this came with my MySQL install.: F1 O6 C k. I/ g
- These instructions will not tell you how you might transfer your data from the& _$ L# x7 a4 J: L" E
- SQLite database to the MySQL database, we start with a clean and empty MySQL
# J/ F. y) I/ S9 \0 D. M G. a - database.+ a& c' ?! Y6 V$ Z) x
- Some users have reported ways to import a SQLite database into MySQL, but at
7 B- D7 K) K3 }2 N7 u - the time of writing, there are still too many issues - check the current status. c i- t0 s7 U! p+ E: p
- in the TeamSpeak forums if you are interested.2 Z0 b# I" Z- ^: t- q
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 N# l; B0 m# R! d, a8 a4 \ - Borland was used. This driver can only interface with the client library that & S4 h* o7 J( n, f" B3 e
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 _+ Z! d6 {2 \6 s. o - client library - basically all you have to do is to use a 3.x client library as
9 o5 i% u5 F' P) Z+ \4 f) X - "VendorLib" and a 4.x database to connect to.
0 v2 L8 x6 j4 N1 n* \2 ^# k: S! i - If you need more info about dbExpress, you can contact Borland.0 ~5 R v* u0 z5 U8 C
- % ~+ X ?! `" b0 V3 ~
- ### Doing the work ###
2 x/ u) T8 }) y2 A, C2 S U0 x - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ U/ o* I) e% c8 G9 U& m9 A& { - the perquisites right, just open your server.ini file, and add this section at
/ _. D3 k2 e& Z - the end:
4 z4 e: s' U- s* @7 H - ---cut here---. B8 o- f" ]* V
- [DBEXPRESS]
' A) u! W: x, @4 {7 j) h - sqldir=mysql_sql
8 u; K2 b) [% @4 I9 ]! y - Drivername=mysql
" P: t! H( M. ` - Database=Your_Database_Name_Here& _& z& O* j5 N8 H$ U7 r% a% P
- Hostname=The_PC_the_MySQL-Server_is_on. U7 f6 Y; n$ I: z
- User_name=User_name_on_the_MySQL-Server& a9 R. [$ ~' r3 G& ?& |
- Password=Password_to_go_with_above_user_name
1 n, b, w7 t p+ Z& Y6 c/ f - GetDriverFunc=getSQLDriverMYSQL1 P4 B9 B; ?! h: H7 u8 s
- VendorLib=path_pointing_at_your_mysql_vendor_lib
; q) i- ^4 W% {/ f5 G - LibraryName=path_to_libsqlmy_libary
; Q+ L& U: P" _) A; l) D - Active=1# e0 @/ T* [( Y! \5 i# R
- ---cut here---
" m3 }7 K* G' M0 n6 Y; K" w - In my environment (a linux box with a MySQL server running locally) I have:
T7 o7 l- ^/ O" o# t# b5 X6 @" S - ---example---" B, l2 Z; F: f" ]* _
- [DBEXPRESS]* k# z- O: K: O. j6 f% K' J
- sqldir=mysql_sql: e9 a4 p0 ?% t7 y( e* \
- Drivername=mysql! x6 t. `+ u7 Q/ j! v" P6 b8 ]
- Database=test
. e: S, O+ v( S - Hostname=localhost7 @7 U7 R3 }0 u5 I d! u+ _2 r% E @) S
- User_name=testuser
# C& D7 k( z2 N$ M - Password=my_password
2 c& F7 L1 @- i4 a; Q* m - GetDriverFunc=getSQLDriverMYSQL
" V* n0 i3 j& q3 I/ M2 h - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* L6 {1 P3 U& j
- LibraryName=./libsqlmy.so
$ a% E' e. S6 Q0 A5 S3 y5 p - Active=1* l; c) Y# A; C0 E" E" r7 B! h8 k
- ---example---# p4 G; ~/ |' V" ?- E3 k' p& y
6 P; M! s* [8 `) Z0 U! [- On a windows box, also running the MySQL server locally, it would be:
$ A3 ?. Q3 `8 U5 t - ---example---( u- D0 C0 R. C* K6 [9 C8 V
- [DBEXPRESS]
& N" U/ L& F9 f0 A( _ - sqldir=mysql_sql
g& u% S' f$ [6 U, z, y - Drivername=mysql
' b9 w, d$ W, n. \9 C3 w - Database=test
9 \ Z- S& ^2 v n; \& e - Hostname=127.0.0.1
# {( M; s0 Q: G* B4 V) r8 M* C - User_name=testuser
* q- n; p" T& \ - Password=my_password
- n. J( O1 g2 L5 r9 d1 c2 u; v - GetDriverFunc=getSQLDriverMYSQL
; P$ N8 ^ u- S( Z" H - VendorLib=libmysql.dll
0 z# s* F2 Y% F6 J3 {4 ? - LibraryName=dbexpmysql.dll) p! [* {" r- t7 e
- Active=1
5 l! r( j+ G5 w# @ - ---example----
% S0 `* w" n% U/ ?* U - - written 02.03.04 by pwk.linuxfan
8 E* U% J0 V: M( c+ V1 C
2 e3 ]$ \( T5 }/ L. P, q! ~8 q& }
复制代码 |
|