|
|
麻烦翻译一下,下面这段文章:xhan
# Y9 x1 x3 [% y- D# h. L* P" z6 ]4 x; U" Z+ `- e9 {8 ?
-
( j" c$ `$ c# U9 n4 E( F, t - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% n7 O. G/ g8 B0 I5 b5 w: d
- ' _5 g9 ]8 T! q; l
- ### What we need ###+ A4 D. a( d" ^" R% \; n' |# k
- Naturally, we will need a MySQL server to store the data for us, this document
/ u* y5 h X$ y4 `( o3 g - will not explain how this can be done - there are documents out there for the : V% l+ O; J+ a$ N2 v# b8 u& }
- interested. The requirements include a (empty) database for TeamSpeak to use
/ _' a6 ^8 Q6 k, g; ?) J4 ?" O* B - and a user account (username + password) that has the permissions to do stuff# ^9 l$ X. S- W1 Q% | F
- with the database. Additionally, you will need a vendor library installed on the i; V3 z6 D; S9 y5 ]: `9 I
- local machine, this came with my MySQL install." w9 ]" \4 j% T$ J+ e, R# F2 L
- These instructions will not tell you how you might transfer your data from the
. u8 q" ^; A3 P! D! }. _( ] - SQLite database to the MySQL database, we start with a clean and empty MySQL
6 A2 q6 Q9 x+ \ - database.
$ C' M4 K0 R+ }+ K; m7 Q - Some users have reported ways to import a SQLite database into MySQL, but at
: \4 b) l* b' O! _ g - the time of writing, there are still too many issues - check the current status
; G& I, b) B+ ?. E7 g - in the TeamSpeak forums if you are interested.
3 l. `6 { K( f2 \. d; ` - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. R! U/ K6 M2 t$ T - Borland was used. This driver can only interface with the client library that ' K; }- d# v! N& Y# P% W
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. W/ b4 a- \0 K% c0 a5 l6 U/ T - client library - basically all you have to do is to use a 3.x client library as
4 I* n. F$ y& _1 F1 [1 ~ - "VendorLib" and a 4.x database to connect to.6 {0 H2 A" P4 @% C% {
- If you need more info about dbExpress, you can contact Borland.
! p! g1 |8 s8 `: l
, ^7 L8 T% ~% q: Q- D' n5 t7 {- ### Doing the work ###( M' G4 f3 `% n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" Y0 {, Y& P3 T; J" N
- the perquisites right, just open your server.ini file, and add this section at/ [6 X/ w/ E$ q, i% `% m
- the end:
7 F' E% E$ d9 c5 y7 C - ---cut here---
1 d0 D2 h) H8 l( b. ~ - [DBEXPRESS]! U% r; ?$ K J* d3 ^) b8 D
- sqldir=mysql_sql) H( n; X' D. d: Q" J7 A! l
- Drivername=mysql: y8 f6 m: H. v) Q
- Database=Your_Database_Name_Here
0 s. j' s7 e* h. {( T( B f - Hostname=The_PC_the_MySQL-Server_is_on2 b. ?3 G: Q- h
- User_name=User_name_on_the_MySQL-Server
' q; U% R$ c a8 b+ [. |/ T - Password=Password_to_go_with_above_user_name6 a* ~5 @) r' v1 R; i* N
- GetDriverFunc=getSQLDriverMYSQL
' w9 h2 @1 y8 w0 [5 ^ - VendorLib=path_pointing_at_your_mysql_vendor_lib
( H) j. C' {. E7 o$ h! v - LibraryName=path_to_libsqlmy_libary- J$ _( X8 @. H9 l% O' L
- Active=1$ m' }0 l9 U6 u @
- ---cut here---# D, P3 s3 H. F% K3 H
- In my environment (a linux box with a MySQL server running locally) I have:
) [. W6 Y, E- n - ---example---2 G/ G. X/ A% m4 A8 H9 k0 h
- [DBEXPRESS]8 d* N1 F- G+ I/ Q4 \
- sqldir=mysql_sql
5 [! t3 C7 B8 S0 R7 C6 _ - Drivername=mysql- M4 M0 @4 G# R" m
- Database=test) O- {3 G& e) j/ u8 h7 U
- Hostname=localhost
, Y, J" {) B. j1 w+ u: c - User_name=testuser1 e/ V. H& P4 Z; l7 `2 F! I- o
- Password=my_password
* f" I+ `+ Z* E: v" P( M - GetDriverFunc=getSQLDriverMYSQL3 e, k" s p+ d1 S9 `0 z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: S5 Q! b `3 f3 ~- y# ?& C, L - LibraryName=./libsqlmy.so- B3 I2 B5 ~$ W9 X7 \6 q; e* O5 W: w; d' T
- Active=17 `6 d% R" x2 k- t
- ---example---2 O) D* f' Y3 J: F) H( Y
4 ~6 a. ^+ T2 X* O5 ?6 ?% ~- On a windows box, also running the MySQL server locally, it would be:) t( d( [$ C0 O4 c) c: `! I5 w
- ---example---! z& o2 R' M3 g; Y
- [DBEXPRESS]" a( ?" D" x+ h2 P) c( l, a
- sqldir=mysql_sql; L( S8 b# |* L& F
- Drivername=mysql
2 G r% g( w, Y* p - Database=test5 P6 H% _2 {) {6 ^- s- h t4 d+ z
- Hostname=127.0.0.10 c# h) k9 u) D7 W
- User_name=testuser/ q; z8 h1 f2 ~6 z
- Password=my_password: B. P- c# x) \$ ?
- GetDriverFunc=getSQLDriverMYSQL
- A+ [5 r4 D7 b6 d' k1 U8 i - VendorLib=libmysql.dll9 g' i/ l2 j4 |+ R9 b2 z$ D& O$ @
- LibraryName=dbexpmysql.dll
) _# J% b% t4 v - Active=1
& M7 ?! C. e1 x7 ]( W: F f - ---example----
2 D; o# T. r( V: N5 R, h - - written 02.03.04 by pwk.linuxfan
) V; \' B5 M$ ]
1 u- ?/ C; ]! @: ]; W0 r
复制代码 |
|