|
|
麻烦翻译一下,下面这段文章:xhan
' D9 l3 b; v7 G U: w/ P8 C# S+ R( j. Q0 j
-
5 _6 C8 x; p2 Z( w - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* u# m. v$ y7 x q, Z4 t3 h
* {! B: ?& h; a) B' w+ ~- ### What we need ###1 {% i% u v+ O* L
- Naturally, we will need a MySQL server to store the data for us, this document : p! V4 L' P9 {2 ? Y3 N, x+ d
- will not explain how this can be done - there are documents out there for the
9 B" {) t" B! O - interested. The requirements include a (empty) database for TeamSpeak to use
k+ x @+ L$ @& J0 ]/ N2 @ - and a user account (username + password) that has the permissions to do stuff
* b9 K! ^6 y/ k! s - with the database. Additionally, you will need a vendor library installed on the- L2 i+ i9 Z3 e" O5 S) L
- local machine, this came with my MySQL install.
3 \4 G( p8 O' w - These instructions will not tell you how you might transfer your data from the
/ s( ~# w7 f' s! P% X - SQLite database to the MySQL database, we start with a clean and empty MySQL& j) m2 F B% e _8 M* E- N
- database.
3 M. {5 D, e, G) P% [& e6 { - Some users have reported ways to import a SQLite database into MySQL, but at
- E% a1 M+ P( a8 t$ q5 {" D1 A - the time of writing, there are still too many issues - check the current status
- b4 A5 `# l# g3 Z8 u* I& r7 d: z - in the TeamSpeak forums if you are interested.# v& W+ W; S9 [5 _' E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 Z4 w; T$ P: o! } - Borland was used. This driver can only interface with the client library that 8 E9 ]4 z# w) f! S
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 A$ v3 x7 A3 y l: | K - client library - basically all you have to do is to use a 3.x client library as
6 q( y$ F% ^& V7 Z* ] - "VendorLib" and a 4.x database to connect to.7 e+ r5 s- L j) A! F" L; c5 \
- If you need more info about dbExpress, you can contact Borland.
) f" I% }3 V0 b X: L0 Z) N - , E# v# K7 b8 |4 G
- ### Doing the work ###4 L% B6 X2 k4 ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
E: |: _6 K8 Q- |- L - the perquisites right, just open your server.ini file, and add this section at
+ l9 a+ \) h( ~8 n: q- N9 y! c - the end:
' N, H. o/ J+ F7 n; c' ]% H - ---cut here---
x2 R9 e4 H b8 t8 } - [DBEXPRESS]
; `) [8 U. k. g; z3 W' I - sqldir=mysql_sql
/ Q# T6 Y0 R9 K* u - Drivername=mysql
* I, A, N# a! y' Z7 Z- c - Database=Your_Database_Name_Here. X7 l2 g# u2 K6 |! K
- Hostname=The_PC_the_MySQL-Server_is_on
6 C8 k$ e1 r4 ~* a" g, T - User_name=User_name_on_the_MySQL-Server& L2 P* M1 t( J8 B
- Password=Password_to_go_with_above_user_name
$ S1 d$ |$ K0 \/ V - GetDriverFunc=getSQLDriverMYSQL0 ~* V7 k. Y% T# b8 O+ {; K1 F
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% U S( K7 o( L" g/ [! R; Y0 R - LibraryName=path_to_libsqlmy_libary
, Z2 U" z% F( T# X - Active=1( `# q; e! J: I& v. X
- ---cut here---" O; b9 y% G) K$ m' O/ ^
- In my environment (a linux box with a MySQL server running locally) I have:
, ~, ]" Y" @6 N* d2 C9 V - ---example---8 q% V2 Y- M6 v
- [DBEXPRESS]* n% R. E& w) O( U4 B$ L/ `4 {! ~
- sqldir=mysql_sql5 d3 @5 R) S* L* Q
- Drivername=mysql) s; F/ ^* x, A2 |. p5 S+ ^
- Database=test
( j8 J3 u. `& D2 J0 { - Hostname=localhost0 a w$ `7 x5 s" w% J4 w
- User_name=testuser5 N4 U& V) @9 x$ P {, z# O2 m
- Password=my_password
7 z/ D# O* ?! M+ Y% _ - GetDriverFunc=getSQLDriverMYSQL
6 b8 Z& `" q4 ] - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.04 ~4 `# n/ y3 v1 _
- LibraryName=./libsqlmy.so
4 A& U3 h& s& T: e! z5 V% z$ ` - Active=1
' h6 y; L5 e2 s6 g4 O$ M - ---example---
! t( b8 W0 V5 Z/ Z! f7 P" S$ }2 n
7 G) `' ]# R& `3 Q- On a windows box, also running the MySQL server locally, it would be:$ ^; B7 z r5 S t
- ---example---/ x3 _- Y, _8 D7 `5 Q0 o% B* _
- [DBEXPRESS]$ m+ ?) X6 i# y: U6 U
- sqldir=mysql_sql/ n9 r2 @. q; c: z, }6 }0 Q
- Drivername=mysql
, J) S1 x& }1 t, U, n1 z! `) m) Y, [ - Database=test9 {' M8 V m4 S* Y# H
- Hostname=127.0.0.1
# q+ O& W# I" c% z' Y1 | - User_name=testuser
3 ^8 I" N( }1 @8 B5 \- ]* V - Password=my_password! a6 f2 |+ a$ r( E4 u$ k8 T0 J1 l+ |
- GetDriverFunc=getSQLDriverMYSQL, s/ ^0 K8 R4 s6 ~" W
- VendorLib=libmysql.dll
3 b+ B: g2 _ h0 { - LibraryName=dbexpmysql.dll
$ ~. F+ |) u) U4 N6 k - Active=1# j8 I; @5 M: E* X: N+ Y1 h
- ---example----
) K% O9 z3 C6 n# N - - written 02.03.04 by pwk.linuxfan. t$ P$ a6 H7 M2 o5 A) A4 H P, W
- 3 N$ w5 Y$ m- ]2 A: w
复制代码 |
|