|
|
麻烦翻译一下,下面这段文章:xhan % p3 Y" n% I- O5 D
' B5 y9 @ `" g0 g! A2 S- ! g# G7 k# _$ S' {' U: K
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 r5 Y( A& F" H$ |- v9 Q- Y/ M3 ?2 _- ]
- 3 b7 K7 r* D1 B& [- v
- ### What we need ###& y; f+ ?& ^- ]; b
- Naturally, we will need a MySQL server to store the data for us, this document 5 d. e- i! }; ~- I# S+ W% k1 c
- will not explain how this can be done - there are documents out there for the 0 m) _' s. \8 u3 |: x7 Z, o+ J F: R
- interested. The requirements include a (empty) database for TeamSpeak to use L' W6 r, b" b
- and a user account (username + password) that has the permissions to do stuff# V! A# O$ @. q( W& q9 V4 T4 Y, Z! n f: u) r
- with the database. Additionally, you will need a vendor library installed on the5 {" P3 x) p# T( L
- local machine, this came with my MySQL install.
y1 h1 ]- }' u# [' e! Q - These instructions will not tell you how you might transfer your data from the
* Y+ d7 X. B6 J, X2 f - SQLite database to the MySQL database, we start with a clean and empty MySQL
, u5 z: I0 e$ Y" S M* ~6 f; A - database.
) Y6 Z* H. O4 s! F5 r0 { - Some users have reported ways to import a SQLite database into MySQL, but at3 W0 h5 H' j! U t) [. L
- the time of writing, there are still too many issues - check the current status
1 x3 d. A a( M% h" y' L - in the TeamSpeak forums if you are interested.
) J8 Z4 Q6 y7 m7 S o% ~ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 U# q7 C7 ]/ s5 n/ X( V* W* r
- Borland was used. This driver can only interface with the client library that ; n# ?, K3 h$ N6 O {+ j$ F4 w% }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- H, N, u9 a8 E* w2 B! G! S" @3 z
- client library - basically all you have to do is to use a 3.x client library as
& u6 w$ a' T% q: u! U$ d# {' y" S - "VendorLib" and a 4.x database to connect to.$ T( W# a, f5 x
- If you need more info about dbExpress, you can contact Borland.
! x! v, \) R5 [ - 4 o+ \2 e8 O: L/ X" Y4 t- H* ^
- ### Doing the work ###1 a B* D& s& l6 L! ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& ] M( C& y5 I8 {
- the perquisites right, just open your server.ini file, and add this section at( L' I$ e) {/ B5 ]8 J/ C# s
- the end:: C ~: @* o8 g, ^5 W$ d
- ---cut here---( p5 Z D, Y* E4 x& e
- [DBEXPRESS]0 t( r) m* F. i8 u1 E1 x
- sqldir=mysql_sql; ~' x9 L6 e/ R9 A# x7 K0 \$ ?
- Drivername=mysql
4 S/ J& R2 I7 l# d' T) j - Database=Your_Database_Name_Here7 l. S' z9 b$ _' f: I9 n W
- Hostname=The_PC_the_MySQL-Server_is_on" {1 [& \0 {" o# c6 N: E( }$ [
- User_name=User_name_on_the_MySQL-Server4 q8 d" y+ E; ?
- Password=Password_to_go_with_above_user_name
& t0 \. J! j: a2 h, @ - GetDriverFunc=getSQLDriverMYSQL
; T2 ~. Y" T8 l. _. k4 s; K5 k - VendorLib=path_pointing_at_your_mysql_vendor_lib2 S: P* ]' F! L+ A, s
- LibraryName=path_to_libsqlmy_libary2 n$ h5 F5 f' a; O7 u$ T
- Active=1
: _. t& k3 p, Y+ i! }/ ] - ---cut here---3 }, K0 r7 U5 s
- In my environment (a linux box with a MySQL server running locally) I have:
1 b( R9 p/ t- d7 ^+ x* B8 l$ j - ---example---1 B# t; ]# w7 N% d1 C/ a
- [DBEXPRESS]
0 z: s8 O4 w/ I- j - sqldir=mysql_sql! M% w8 z6 [- }6 c a7 M; h
- Drivername=mysql5 n6 K) b1 I( d5 C3 E! m3 K: [
- Database=test1 u# R* W, H9 z# \' K" m
- Hostname=localhost: z" F- U7 Z+ A' r/ C9 E$ T( R# o
- User_name=testuser' q+ U' s- i5 |
- Password=my_password
1 f# J. E1 N$ c - GetDriverFunc=getSQLDriverMYSQL8 O+ }: W$ X) Z8 O! m7 Q" X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
) F/ a4 n5 P( R. [0 k' A+ q; z - LibraryName=./libsqlmy.so
$ _% k# d; h! L# B6 U A5 R - Active=1
% ~( |9 x2 Q; b - ---example---( k' k* ?3 ]( [$ K/ |3 W
$ a. v' p% b0 B; o0 u+ ^- On a windows box, also running the MySQL server locally, it would be:& n* h n5 ]4 p5 H2 y
- ---example---
, n! P! @5 S( `# G' i - [DBEXPRESS]) v2 `( {! g1 s+ t
- sqldir=mysql_sql
8 G: ]8 ?; D7 J$ |% h - Drivername=mysql
! W t6 R1 g" x$ y - Database=test c% t& N9 E' `$ r5 O& B+ \* t& H
- Hostname=127.0.0.1
/ H1 n, \$ n8 _0 f3 M+ e - User_name=testuser
$ \' Q3 n% `9 F7 a7 V; M9 L - Password=my_password& |" }7 l/ ?0 U
- GetDriverFunc=getSQLDriverMYSQL, Z8 F0 M% Z0 y) ]3 g. Z# ~. {& O
- VendorLib=libmysql.dll
, Q- M; @$ v' m& w6 d0 O - LibraryName=dbexpmysql.dll+ _1 D/ L% u$ V- g
- Active=11 [9 D1 k, w5 n( M* }5 I1 S
- ---example----% v& A) I7 i6 X& J6 S: U5 O6 Z
- - written 02.03.04 by pwk.linuxfan$ R3 D. m6 S* B
- 6 g/ ^. W3 f% m
复制代码 |
|