|
|
麻烦翻译一下,下面这段文章:xhan 3 p. k! Y, I( f% R
6 k0 c K3 ]: b" e, E6 E3 j) u
-
6 ~, J& f2 e. p9 N8 ^ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( j4 @9 y# P& I1 R
+ V5 ?6 X" d2 F Z& l" [7 d- ### What we need ###
1 f- K/ D" Q7 v6 i; @9 |1 K+ Q- [% u - Naturally, we will need a MySQL server to store the data for us, this document 0 G5 t7 w( N" S+ E# `# a
- will not explain how this can be done - there are documents out there for the
7 f6 ]% m; y. }1 J1 J8 o - interested. The requirements include a (empty) database for TeamSpeak to use9 a0 G6 X7 L- u# w" R
- and a user account (username + password) that has the permissions to do stuff
3 Y, p6 g* \3 b# ]" p - with the database. Additionally, you will need a vendor library installed on the
( _- F+ z5 U c/ |: Q6 N& Z7 ~ - local machine, this came with my MySQL install.
* k7 `' W8 p4 a$ d! @# C - These instructions will not tell you how you might transfer your data from the. ]5 j1 T" {- S! _" Z9 e! M
- SQLite database to the MySQL database, we start with a clean and empty MySQL
3 Q$ N9 X6 N3 O4 Q: U - database.7 x: O. W% Z1 T* w$ R; |) o0 d0 g
- Some users have reported ways to import a SQLite database into MySQL, but at. F; j) ?, e+ d8 {* i
- the time of writing, there are still too many issues - check the current status+ D) w1 q( H' |4 \
- in the TeamSpeak forums if you are interested. k3 G! n! f) x) p" ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; `) T8 _3 Y% l
- Borland was used. This driver can only interface with the client library that
( B# I% ?1 A' x+ F) K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, R0 r" ]3 I+ A - client library - basically all you have to do is to use a 3.x client library as
8 G0 m' U" F- q, H - "VendorLib" and a 4.x database to connect to.
" v) f% L" t! ? - If you need more info about dbExpress, you can contact Borland. H% o. V+ M- K4 J
- 2 T6 b/ a! W4 K
- ### Doing the work ###
- @% l, u+ b: S( u9 f/ ] - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
! i1 f: N( e V - the perquisites right, just open your server.ini file, and add this section at
% k( [( i2 o) V, E - the end:7 m# S) L4 C9 j7 u2 j7 {. j
- ---cut here---" J# w* m* B9 X
- [DBEXPRESS]2 @ D6 R0 n6 j% ?% ]
- sqldir=mysql_sql- g% d; j& n! y& U) Z
- Drivername=mysql/ V# ]" G9 [/ k: H+ z5 c. z! e
- Database=Your_Database_Name_Here; g% C3 q( x$ @* V3 ^# b
- Hostname=The_PC_the_MySQL-Server_is_on
1 \8 r- c5 w! R2 m - User_name=User_name_on_the_MySQL-Server
7 M; ^3 V/ D/ }- \ ~3 { - Password=Password_to_go_with_above_user_name5 h' V1 A6 _7 S( G8 c9 y d
- GetDriverFunc=getSQLDriverMYSQL
9 C6 E6 w+ f: ]. f) e8 h - VendorLib=path_pointing_at_your_mysql_vendor_lib
8 q, m# |' i& B8 {& B - LibraryName=path_to_libsqlmy_libary( J% W' S$ f1 W6 h3 {0 G3 U
- Active=1
" A- N( \ N% J5 `& ?' i8 x+ C - ---cut here---3 p; t7 R: V; F8 }* k
- In my environment (a linux box with a MySQL server running locally) I have:
/ O! `2 T* u( o6 |3 J- J( M - ---example---' c/ ]! ]4 r- s9 F+ I" @' G
- [DBEXPRESS]5 s: H' y: v1 g
- sqldir=mysql_sql
3 o2 i: h7 S; v9 [. R5 P+ | - Drivername=mysql: T" i8 C# C5 _1 @/ {2 X- E
- Database=test) F+ @1 q2 d% j8 q0 C
- Hostname=localhost
$ Q/ ^ A+ }6 n, i2 h# `8 G - User_name=testuser9 j2 y `. U' h& k; p& G4 P
- Password=my_password
. J1 K, t+ G' i/ E7 k( {$ n - GetDriverFunc=getSQLDriverMYSQL
+ n g& i$ A( h" m; `6 s0 l5 T - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; v+ o" h% H9 F - LibraryName=./libsqlmy.so; i% C# f w' I1 m9 o
- Active=1+ Q! h* Y0 l4 u/ o4 ^# x
- ---example---
9 S, ~( \% }. P9 c( q9 d' M - a" b, @5 w% }) U
- On a windows box, also running the MySQL server locally, it would be:( ?1 e( A" s2 F: {2 f( _2 D- c. U
- ---example---
4 a; \: d7 R$ D! B5 B2 X - [DBEXPRESS]/ l! p: E a# `4 I% W
- sqldir=mysql_sql
3 U6 d+ }( `' F% t0 A* U4 f" _ - Drivername=mysql
# T5 P! i& E6 ]8 y - Database=test
/ V) A& m( t6 R! l - Hostname=127.0.0.17 C8 ?. V3 W$ d; U( r- ~
- User_name=testuser; M6 R% z" m) j6 m
- Password=my_password
8 f8 b) S* g% ?/ z5 l3 N6 a - GetDriverFunc=getSQLDriverMYSQL
6 L N. A9 y( g# l6 L S5 b - VendorLib=libmysql.dll
1 v3 C ~1 R: _0 @ r& f - LibraryName=dbexpmysql.dll
# X# U: h! v- l) o! |3 C! h - Active=1
- \! L! j; \+ d+ V, u - ---example----+ O, P" X' `: O. U4 z7 T
- - written 02.03.04 by pwk.linuxfan
1 c7 p. }& G! g9 J# k% }
& D8 `2 V$ N% m l
复制代码 |
|