|
|
麻烦翻译一下,下面这段文章:xhan , s) _; X" S+ @: o- |3 i& o4 E$ v# c
+ F0 V# p' e% J$ H: A- 7 i5 x% Q( {/ _& s0 w+ Z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### z# O1 t+ c6 E- P: d9 V
- % B+ ~* L. e6 o) V; f
- ### What we need ###+ R f% |, |6 p' `( ^0 O7 {
- Naturally, we will need a MySQL server to store the data for us, this document ( }; W/ b3 Q' y: a: r
- will not explain how this can be done - there are documents out there for the
5 D7 T# E& Y0 j2 D! y - interested. The requirements include a (empty) database for TeamSpeak to use# H4 _$ w3 b" N! g& T* I& ^# e/ c7 d
- and a user account (username + password) that has the permissions to do stuff
6 l3 Z1 N8 g4 g8 c5 G% v - with the database. Additionally, you will need a vendor library installed on the( G% x. Y; _8 j1 U
- local machine, this came with my MySQL install.
9 d6 f, A3 D" r) E: D3 D' b - These instructions will not tell you how you might transfer your data from the6 ~$ N3 g4 j6 I2 l" V6 n, |
- SQLite database to the MySQL database, we start with a clean and empty MySQL
6 d) j; w/ k3 J5 I - database.$ k( L, }2 M" H) S+ [# H4 I E
- Some users have reported ways to import a SQLite database into MySQL, but at
; j* c, ]+ d9 i# B5 a5 Y! O! R - the time of writing, there are still too many issues - check the current status& ?5 F% R+ L8 H/ R6 ?; v p
- in the TeamSpeak forums if you are interested.
; v$ _' ^, L8 w4 J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: V- s3 a R: w - Borland was used. This driver can only interface with the client library that ( p' w3 d- y6 p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 ^2 d6 q$ i8 y9 f; [0 M) ?5 h/ m - client library - basically all you have to do is to use a 3.x client library as 5 l- b' U# H) J7 j( I2 J
- "VendorLib" and a 4.x database to connect to.& L( ~# D, F4 L' q
- If you need more info about dbExpress, you can contact Borland.
: X8 E8 _$ X w5 q# A - ' ]3 k1 m$ } {! Z% L0 e- s5 `
- ### Doing the work ###
7 q3 S5 `! N9 a: E. v1 t - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 e: z- b" }+ M
- the perquisites right, just open your server.ini file, and add this section at# \& S1 E; Y/ j0 N
- the end:. H5 e0 o- N$ s
- ---cut here---0 O( @ k t& O( n( z
- [DBEXPRESS]3 J2 K) H4 a+ b, h3 Y
- sqldir=mysql_sql
, {% `8 y4 m: x3 ~ - Drivername=mysql
9 f! W% A. S& J8 j3 M+ Z - Database=Your_Database_Name_Here& z8 Z9 C, t: I# q6 g0 D4 `4 D
- Hostname=The_PC_the_MySQL-Server_is_on
; G9 `% v4 k* A - User_name=User_name_on_the_MySQL-Server1 T& D$ _4 X: o* A5 j( ~0 l
- Password=Password_to_go_with_above_user_name
8 b1 A) b( {1 @3 o5 |8 a - GetDriverFunc=getSQLDriverMYSQL
" i- j/ S- Q" Y% z4 l' i - VendorLib=path_pointing_at_your_mysql_vendor_lib
7 a% {4 ]( z+ l J! L/ T0 ^ - LibraryName=path_to_libsqlmy_libary; w; w! z) {, Z" j# V
- Active=1, ~* l( G! t9 p1 Q2 u
- ---cut here---
+ n: p4 b9 H$ W. C9 g - In my environment (a linux box with a MySQL server running locally) I have:
9 e8 T* t v0 o( l - ---example---
0 j! Z: _. k5 x. j- |: m6 I; X. ] - [DBEXPRESS]
9 \% O" a3 Z I1 F3 `9 r$ E - sqldir=mysql_sql
* U3 p+ Z3 R+ j - Drivername=mysql
" X. S6 j9 x9 b" p# k - Database=test5 N: W) k1 ], b$ o
- Hostname=localhost) }- G9 `+ y& I3 x% Z
- User_name=testuser8 w& i9 f& ]+ i
- Password=my_password( D0 t7 z! ~7 q2 B7 |# E* ^7 t
- GetDriverFunc=getSQLDriverMYSQL
: t+ h8 G, f+ v. i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
$ T% s0 i) @5 G: c6 G - LibraryName=./libsqlmy.so! O- j! i; u, g: u) s# R: K
- Active=1
8 g& l3 ~& ~5 j+ O+ X0 O - ---example---
* C( D9 F; C8 s6 J5 S, }
! Q/ f9 a5 ]' ?4 H) S- On a windows box, also running the MySQL server locally, it would be:; q& A% a* e! b4 m. A
- ---example---
* J8 }, I2 M! p1 Q H( G - [DBEXPRESS], T9 }0 a. x8 M' y
- sqldir=mysql_sql0 H/ M# ^! A2 \% C
- Drivername=mysql- `9 Z ]7 P' U$ M6 B
- Database=test
, s6 O$ p6 f$ L, X3 i - Hostname=127.0.0.18 W3 D% m4 B- h" p. w9 d- g
- User_name=testuser. [) N5 N: H& }
- Password=my_password5 N- Y1 N5 Y) Q% p p% n4 g, L
- GetDriverFunc=getSQLDriverMYSQL
4 J; W" w/ v+ C+ f6 W, n - VendorLib=libmysql.dll. f B) D' n/ Z( F, E
- LibraryName=dbexpmysql.dll3 ^" s7 z2 s$ N3 _, F9 d% `
- Active=10 |; N+ d1 c5 k" a8 n, L' O1 q8 f
- ---example----6 Z8 u; H5 j' G, l$ ^# N v. f
- - written 02.03.04 by pwk.linuxfan
- F# q" p4 t. [% i9 m4 f' X/ |
2 S: |- R0 ^0 l# r0 r) T' }
复制代码 |
|