|
|
麻烦翻译一下,下面这段文章:xhan 3 ]. g* J8 M; u4 j) v
; r; P9 k- W1 V9 m
- Q# L# X7 Y2 ^: j, }8 D
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. B# C: @+ B9 [9 g* q- {2 D+ Q% A - - f6 U/ l/ j3 ]' t' B0 @# T
- ### What we need ###
, s6 u5 B) N* X - Naturally, we will need a MySQL server to store the data for us, this document , s+ j* B7 f" [, o
- will not explain how this can be done - there are documents out there for the - j5 d+ u" N) {4 j0 C/ K6 k( Z
- interested. The requirements include a (empty) database for TeamSpeak to use; o. o# o* ~$ D7 c7 S6 P" {7 @6 Z
- and a user account (username + password) that has the permissions to do stuff
, o5 e7 f) c; M% g. m- E1 _0 f - with the database. Additionally, you will need a vendor library installed on the
]$ _. m4 n9 I: Q0 a+ Q - local machine, this came with my MySQL install.
5 X$ K$ q7 k O9 f8 [# M6 @' \ - These instructions will not tell you how you might transfer your data from the4 y# F9 t8 O [1 ?- g) z0 l8 E( k" m
- SQLite database to the MySQL database, we start with a clean and empty MySQL/ c8 p5 v, p$ `' ?. D9 y
- database.
|8 s# S6 h3 G8 z" t - Some users have reported ways to import a SQLite database into MySQL, but at
# d. W) A! I1 n" q% ^8 T - the time of writing, there are still too many issues - check the current status
+ |( C$ [" f& t1 d! e - in the TeamSpeak forums if you are interested.
0 p4 F- k! P# Z - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* M `' B7 K. ^. \; T0 d. X - Borland was used. This driver can only interface with the client library that + v. {) G- ]; q" k5 Q9 g* K. Z
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 @ J; f% l- f" V4 R$ {
- client library - basically all you have to do is to use a 3.x client library as
; ~4 h- i) x; n# d$ ?; ?+ D$ s. W - "VendorLib" and a 4.x database to connect to.
" Q$ k, C1 D R0 [' J; R8 c( r - If you need more info about dbExpress, you can contact Borland.; \% R/ x1 z: V# T2 _" b( T |
- $ V4 ?8 T5 k4 o- w$ Q
- ### Doing the work ###9 H; H% t3 U* ~5 q+ c
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" s' A4 a7 U* q9 z/ L ^
- the perquisites right, just open your server.ini file, and add this section at& D& S- W* e6 w
- the end:. b7 K& [9 m* B# i% [6 v
- ---cut here---
/ }. s$ O2 G h - [DBEXPRESS]3 R; R0 x- l$ x
- sqldir=mysql_sql
( M* B4 ]8 i1 S/ m' G5 G/ ^ - Drivername=mysql8 Y/ w: v- U, E$ r/ Z
- Database=Your_Database_Name_Here
" v3 F5 }- R# x& j& N - Hostname=The_PC_the_MySQL-Server_is_on
: K) r$ s Y' Q0 O' q Y - User_name=User_name_on_the_MySQL-Server
( ^$ o; z' Y2 [* D - Password=Password_to_go_with_above_user_name5 s2 y$ ]% Q. U7 \1 L2 L
- GetDriverFunc=getSQLDriverMYSQL
' B5 S3 c2 ]7 x; q* k - VendorLib=path_pointing_at_your_mysql_vendor_lib; o9 g5 h7 m4 @ \2 y
- LibraryName=path_to_libsqlmy_libary! X* I1 f! r" w$ D- A- t( r8 Q
- Active=1- Q# t, q' C: I; B$ d" M6 @
- ---cut here---
0 c2 |( _& q; B4 J% j) a - In my environment (a linux box with a MySQL server running locally) I have:
' W" [- `- `# r1 o1 K+ q6 m - ---example---3 d, l+ u% x* o
- [DBEXPRESS]
, `5 X* v" P; w n2 G, r4 r- u$ r2 \ - sqldir=mysql_sql5 F: M: a* D( c' e( E& n
- Drivername=mysql6 Y1 z3 n8 K v; c) ]( g. Y# K
- Database=test" j$ [+ y y; }( _ z- X' c
- Hostname=localhost
7 O6 d o1 J* M, E" M5 s - User_name=testuser# h) m& O/ ^2 X# d
- Password=my_password' r$ a8 Q+ h- j9 |
- GetDriverFunc=getSQLDriverMYSQL
, P! i& W, O6 n i/ ^: ~ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ S7 f. w }) G* R" M% g - LibraryName=./libsqlmy.so) L2 D* Q) P/ M6 U& T- r( @
- Active=1
1 Q" U: U) ^: t1 {$ E1 v; d9 S - ---example---5 X* Q5 U# O X( ^
9 Z1 X2 f- o3 q& l. H n4 v- On a windows box, also running the MySQL server locally, it would be:
9 x$ [# V9 p9 p. ^0 Y+ ]0 T - ---example---
7 h, c5 c' \! E+ C3 ? ^ - [DBEXPRESS]! y4 D, ]( {. U
- sqldir=mysql_sql5 z) |4 @. ~ u' W
- Drivername=mysql
, v9 F4 H) f* U) w& a - Database=test: u5 ]& G" s# j/ W5 \0 u1 v
- Hostname=127.0.0.1
- o% t3 q$ w" D# K g% }9 i0 O - User_name=testuser
# c2 G) [! j$ B I, L) D# I% ? - Password=my_password! K4 T) v. @% a1 [
- GetDriverFunc=getSQLDriverMYSQL O3 a+ \7 K/ Y. a
- VendorLib=libmysql.dll
/ z0 @: j: \- M% W! E9 H& G, Q* F - LibraryName=dbexpmysql.dll
4 ?: K% `2 B6 X" H. b - Active=12 r3 X; A7 ]# ^& a
- ---example----8 H2 D8 e, \' w' t8 L
- - written 02.03.04 by pwk.linuxfan
% g0 C9 H0 E R" b+ p+ P - + @1 Q& ]" B" E7 K! ?9 @2 Z
复制代码 |
|