|
|
麻烦翻译一下,下面这段文章:xhan ! i/ P M# }4 Y% g6 H) b4 X
& k6 Z9 l- P9 S+ e h- B-
$ W& D n$ w5 E8 h: z8 y" f - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 t7 t, \7 f* i* _4 f
( A6 ~3 E& v- g8 F& {& B9 q- ### What we need ###+ t* t* Y5 S* I3 D! u _6 x+ u# u0 L
- Naturally, we will need a MySQL server to store the data for us, this document
) P% k r+ C# b6 J3 L- ?: ] - will not explain how this can be done - there are documents out there for the ]# a, A$ k# U' k+ }
- interested. The requirements include a (empty) database for TeamSpeak to use
" F8 l0 M+ u0 d" O# ]9 s - and a user account (username + password) that has the permissions to do stuff
/ m7 O4 c. N: l$ h( w - with the database. Additionally, you will need a vendor library installed on the$ m) X$ A! t- N& q: l3 s% q
- local machine, this came with my MySQL install.! Y0 z8 m. J& T% J; k& A2 Q
- These instructions will not tell you how you might transfer your data from the
1 [ S# \/ j4 |+ [, e. { - SQLite database to the MySQL database, we start with a clean and empty MySQL
1 y6 W6 R+ _4 S4 X# S - database.& T" ~, G e; r1 N" ?
- Some users have reported ways to import a SQLite database into MySQL, but at
9 i* l' o, i2 T" n6 z - the time of writing, there are still too many issues - check the current status# m( \) ?8 j" q% V$ m K6 H! f
- in the TeamSpeak forums if you are interested.
k' o" D0 p k8 [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 `& j- N' p1 K' ]( r5 k
- Borland was used. This driver can only interface with the client library that 3 C( h/ v4 q' Z. m4 y+ _) G
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( Z( Z, @. Y. T" S, w. w7 a5 n - client library - basically all you have to do is to use a 3.x client library as - F' K/ \+ F' V/ X/ ?8 H
- "VendorLib" and a 4.x database to connect to.
( r& q u' v9 j' | - If you need more info about dbExpress, you can contact Borland.
3 N3 }6 H3 K1 R1 `+ e
8 @: v, T- E( {8 B& |0 I- ### Doing the work ###
' R! q' a+ x# o9 `3 v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- y$ V- L( T" _9 ^( D" c - the perquisites right, just open your server.ini file, and add this section at/ N0 y: J" i- M4 o+ W6 M6 N
- the end: v' W0 E" n) n4 c* ]3 e
- ---cut here---* a ^) L/ e7 V
- [DBEXPRESS]8 W3 K5 D5 d2 I; j
- sqldir=mysql_sql+ V7 f, q; X! A, R2 ~" o
- Drivername=mysql
- l3 }) P# M0 n2 j - Database=Your_Database_Name_Here. k1 U! Z b8 V# W" e+ Z; Y( a H# l
- Hostname=The_PC_the_MySQL-Server_is_on
8 z7 O5 B# ^) X0 ?; g; ^) [ - User_name=User_name_on_the_MySQL-Server% V* ], e( I. j/ t; E
- Password=Password_to_go_with_above_user_name: j8 R S5 M" w0 y! Q: p
- GetDriverFunc=getSQLDriverMYSQL
; e# Z# s2 v" M3 a' @. T7 |+ P3 ]5 S - VendorLib=path_pointing_at_your_mysql_vendor_lib0 e J; X$ S! f9 o: z
- LibraryName=path_to_libsqlmy_libary
7 g" Z4 f/ j" C4 O$ o - Active=1) Z/ X7 G/ d+ V( Y& R
- ---cut here---' Y0 A* u$ ]4 ^1 `3 X% Z& M
- In my environment (a linux box with a MySQL server running locally) I have:
) x% [, @. U6 n0 p! ], n7 I - ---example---
7 ?. G+ V8 y7 h1 B. G, W* Z+ O - [DBEXPRESS]8 `( K! U) A6 h- I- G% |
- sqldir=mysql_sql
9 F4 q# s& f( D) E, W4 Q1 } - Drivername=mysql3 S9 L+ }5 r- V( B
- Database=test
8 z9 R9 l- N/ L. R' C/ R - Hostname=localhost
: W: i4 H0 b/ r0 }4 K- e6 M' s - User_name=testuser# s9 d4 j: p% y _; \3 D
- Password=my_password5 ?% o, Q3 ?+ U
- GetDriverFunc=getSQLDriverMYSQL
% @+ g8 x7 t& z: A - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) _4 F8 z! J/ s; l# r
- LibraryName=./libsqlmy.so
9 H. g! w( f+ _% ~9 Q1 Y" `! O - Active=1
. X( E3 K6 N9 d# b) z - ---example---
% J$ ^- y5 s. r; ~4 {
" {% t5 E# ] U* a9 O- On a windows box, also running the MySQL server locally, it would be:
5 n( K: P+ E9 n3 |. f3 v - ---example---9 ^) Z! }: w$ q) m! [3 V; f: Y' u/ }
- [DBEXPRESS]
/ [4 \, M& m& I6 X4 { - sqldir=mysql_sql
, Z+ P! \4 u4 j( G& i - Drivername=mysql6 D) u& }* i8 H: R
- Database=test
" ?* ~7 R4 z: S6 P* u, P - Hostname=127.0.0.1 R8 z: V3 k" e6 a/ S, h
- User_name=testuser& E) Q! u- w# M
- Password=my_password8 _; v' s# e6 D, {: ?7 G* t" `
- GetDriverFunc=getSQLDriverMYSQL: v) U/ O, H) q2 ^
- VendorLib=libmysql.dll# r5 \$ s1 H0 J
- LibraryName=dbexpmysql.dll4 x3 O- ?) A1 i# P* @% p
- Active=1. {1 t% {( ?5 \3 m
- ---example----% Q. x% _' ? l! i' T
- - written 02.03.04 by pwk.linuxfan
4 t: e" w$ W. v; ~
0 g" a* A0 q/ P) Z% }0 B
复制代码 |
|