|
|
麻烦翻译一下,下面这段文章:xhan + {' [! H+ c9 Z) K3 K
* v4 V, K+ \1 x( i* @7 H$ Q6 S
- , }# Q2 z. @! B2 N! G- V# }: n
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 K+ E8 V! j9 q0 m" C; K6 x
- & B7 D* q }% [/ b7 l. D
- ### What we need ###/ y) r' [- m5 t# {* B! m# w5 e
- Naturally, we will need a MySQL server to store the data for us, this document 9 ~% v, l [) w! F: i6 s
- will not explain how this can be done - there are documents out there for the
; d: p o9 ^% w3 e4 y4 n" F - interested. The requirements include a (empty) database for TeamSpeak to use
0 Y4 T( H" f2 { - and a user account (username + password) that has the permissions to do stuff, b! A, j9 A) L2 I2 I
- with the database. Additionally, you will need a vendor library installed on the- Q5 g3 x' ^7 |3 `; ] a
- local machine, this came with my MySQL install.
$ y. |8 w5 @( c. x5 l; b - These instructions will not tell you how you might transfer your data from the
, q8 s9 w4 J% `+ K& ] - SQLite database to the MySQL database, we start with a clean and empty MySQL( A1 {; I, t9 z# i
- database." r" L+ V2 }9 P
- Some users have reported ways to import a SQLite database into MySQL, but at
, _) j* |8 g* \3 o/ N - the time of writing, there are still too many issues - check the current status
' Z3 P. @! I1 r0 L9 f8 L - in the TeamSpeak forums if you are interested.3 b A! O& V8 |0 y, v5 `. J
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 q6 a" D$ o: i1 _- s. L) r$ ? j - Borland was used. This driver can only interface with the client library that
, r* H! v! [( B m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 e! i6 U9 ^: q, N# x9 U, a
- client library - basically all you have to do is to use a 3.x client library as 8 P3 o( F2 \0 c) P: d5 _
- "VendorLib" and a 4.x database to connect to.
. B) C; n; p' U3 P/ _ - If you need more info about dbExpress, you can contact Borland.# x/ [8 C$ [6 D
- " {5 ?5 R% ~+ Y1 H% j8 y
- ### Doing the work ###+ M) B5 u- Z) \: S- O6 k
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( L) m% `# |9 B! I+ |' v# z - the perquisites right, just open your server.ini file, and add this section at
* L I9 k' R4 s+ N) ]8 P! } - the end:
0 {$ h$ k5 K3 i) {4 T - ---cut here---2 i& y7 R5 E, t! s/ x
- [DBEXPRESS]- `) h7 s2 Z) u, h/ c* \. |6 m
- sqldir=mysql_sql
: Q8 e9 t. N6 _& { - Drivername=mysql
0 _! Q# y6 V* {3 S1 r! ` - Database=Your_Database_Name_Here( I2 ]( ]* ?: i1 a( Q) j
- Hostname=The_PC_the_MySQL-Server_is_on9 I5 h3 P( z5 q. _* ^& p0 J2 \
- User_name=User_name_on_the_MySQL-Server
5 j7 V" ^; Y% O$ N - Password=Password_to_go_with_above_user_name
) Y! V" O9 h0 b2 Y& R) f - GetDriverFunc=getSQLDriverMYSQL: g7 y! }2 W( _: @* V1 e
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 c4 X6 b% d" ~; Y1 J* R! P - LibraryName=path_to_libsqlmy_libary+ V j$ x4 `- x/ b# b
- Active=1
8 k$ ?: ^+ m6 ]1 A4 z# M - ---cut here---" v5 C: V3 I6 x' P
- In my environment (a linux box with a MySQL server running locally) I have:
, R7 A% {4 A* e! M3 T - ---example---) @ b! x5 g/ Y. A4 D: i# @5 W
- [DBEXPRESS]
f; q; v1 X# f" X) F. y2 K - sqldir=mysql_sql
" _! G0 s8 w6 `9 k - Drivername=mysql
2 Q: i* j- l/ v* {0 X" I& f - Database=test5 ]2 T) @! i0 {. B7 c- M' W7 o4 ]
- Hostname=localhost4 `) F2 P" X Y, P" K! `" \
- User_name=testuser
. U) h+ p. S+ a4 U - Password=my_password; S' _) ~ B" c' Z
- GetDriverFunc=getSQLDriverMYSQL
4 T0 [/ H6 G! k1 N& l% a1 b2 a - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& ]6 R! ]# a4 ?6 g! _0 d# f' t - LibraryName=./libsqlmy.so
, F9 j2 j( X7 q2 k - Active=1
P& C4 {% z* j8 X/ q - ---example---3 V! c1 c, X5 D7 t; G2 H) i
- 8 f/ Y, T( ~2 r* O6 o1 n. K3 h
- On a windows box, also running the MySQL server locally, it would be:
0 j. A' v5 f: s2 i& Q - ---example---
$ X$ N. L( j$ j7 x, {' t - [DBEXPRESS]2 N$ a/ U8 a7 h
- sqldir=mysql_sql6 d4 u h* ~3 R. ^' u- @
- Drivername=mysql
% C4 m( h/ c7 X' a* d* L- j& K - Database=test
% M) O7 r; U! I% U. M& f' L1 H: { - Hostname=127.0.0.1
6 u' Z' j3 N& v8 a [ - User_name=testuser" v' h. L" C# u* g
- Password=my_password
9 ~4 d# t6 ]/ `$ C& k) m - GetDriverFunc=getSQLDriverMYSQL7 t* W3 m2 n4 n5 Q4 u/ i
- VendorLib=libmysql.dll' M8 }5 f' o4 [& g
- LibraryName=dbexpmysql.dll
% H0 _/ A2 T; U8 j! r R9 H7 s* Q - Active=1
- m0 I* ?! V. A2 ~ - ---example----+ o7 [, l X/ c
- - written 02.03.04 by pwk.linuxfan0 [" l+ Z6 [, }
0 p% E- J3 C: O) L3 q
复制代码 |
|