|
|
麻烦翻译一下,下面这段文章:xhan # K. e& h! o5 y4 x* Q
7 }" c' m7 @( J& k-
( c; S& H4 p) P: z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* l8 w; o, ~) K7 a& U2 g2 H - & \& x$ @0 T8 F& }# R5 s2 i
- ### What we need ###
7 ~( H6 I; c! _1 Q0 [4 i# p2 E - Naturally, we will need a MySQL server to store the data for us, this document
! P! ]- R# J' k' `$ g% } - will not explain how this can be done - there are documents out there for the
+ `* b2 D6 _( ?+ l - interested. The requirements include a (empty) database for TeamSpeak to use
/ p$ c0 c4 l, \+ P - and a user account (username + password) that has the permissions to do stuff( `' l0 { }! f e1 }
- with the database. Additionally, you will need a vendor library installed on the7 ?8 U: t% e* ^" y# p
- local machine, this came with my MySQL install.
0 h# q0 a; ~6 i8 \4 u) C - These instructions will not tell you how you might transfer your data from the
; q' n7 \. p4 P, Q. Q2 t+ O - SQLite database to the MySQL database, we start with a clean and empty MySQL7 c$ P- x0 \9 w3 q% p( V0 `* }
- database.
) n; u# I) P6 M# b3 b - Some users have reported ways to import a SQLite database into MySQL, but at5 d& { K. B% ^8 H+ s/ d
- the time of writing, there are still too many issues - check the current status
5 D& E' w! u5 y) @- i* o+ k$ q - in the TeamSpeak forums if you are interested.; E' O" p/ Q4 ~/ _, k
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* H8 l/ U: W9 V7 @ - Borland was used. This driver can only interface with the client library that 0 N& l0 v8 P1 g0 h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: C7 C+ B0 q, E( U t
- client library - basically all you have to do is to use a 3.x client library as
9 e* f2 D% W) ~9 ~- T" z0 t3 i - "VendorLib" and a 4.x database to connect to.
- f5 L; i3 E1 j+ \" d - If you need more info about dbExpress, you can contact Borland.2 E5 i, i9 t, a
! P( u1 b" f9 R8 ^3 Q A3 _- ### Doing the work ###
$ T! k9 k0 M+ h x, L9 { - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- D; T& ~/ i7 E: G0 V+ | - the perquisites right, just open your server.ini file, and add this section at. V `1 K7 T) I/ T% o+ }4 ]
- the end:
) G9 i5 q; `& s, \9 g6 t: ^ - ---cut here---
( `$ Q8 Z- d0 x6 n9 B, l/ x" K - [DBEXPRESS]
3 ?* z, S6 R- u1 W3 j( n- c - sqldir=mysql_sql
4 ?6 J- b. |7 h5 e+ @6 {' H6 Q5 @0 J5 b( ] - Drivername=mysql; R( A# r) M3 ^+ s
- Database=Your_Database_Name_Here
' F8 e2 P/ N& f2 t4 h) e8 i' _9 z - Hostname=The_PC_the_MySQL-Server_is_on
( i0 i! L& p1 O* m K$ D+ d, w - User_name=User_name_on_the_MySQL-Server
# J, S6 g' S# g( C) V: L - Password=Password_to_go_with_above_user_name
8 S X0 B( ?5 `9 ^4 }# S) | - GetDriverFunc=getSQLDriverMYSQL
* p) ?3 t( E, }0 x9 w: g' j" p - VendorLib=path_pointing_at_your_mysql_vendor_lib5 [! j' G) ?/ {+ O
- LibraryName=path_to_libsqlmy_libary' F; n1 C5 m) b) U
- Active=1
`: H6 N5 i5 H9 N8 G3 y - ---cut here---
' w" F: ]$ H' ^0 {& Y7 u; ~; f* H - In my environment (a linux box with a MySQL server running locally) I have:
6 T( H7 G! i, @+ |8 q. d$ j - ---example---
) W# l1 A. R$ x0 i7 O1 S - [DBEXPRESS]
1 y( v! O2 J" s3 m/ V9 H8 w - sqldir=mysql_sql
: n% C1 Z3 l+ Z! d9 \2 o% P& _ - Drivername=mysql
% `) K5 p1 c1 p - Database=test
* Z Z0 x" J& g1 }( z - Hostname=localhost( J: G! }! O( q& p& \1 z z( K6 i5 y) z
- User_name=testuser, `# `. r/ _. k( Q1 H; K6 A& i
- Password=my_password: Q; q$ Y& H3 _
- GetDriverFunc=getSQLDriverMYSQL
# Y: I j7 M2 C5 M - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- I- }8 L% g/ d - LibraryName=./libsqlmy.so' N4 v7 h. z2 p
- Active=1: {, V% y# D7 T1 E8 ^' u# y( Q/ b
- ---example---
5 G ^! j/ u) _0 _& m& \7 P - . g9 ]) p/ ?3 C0 W5 m
- On a windows box, also running the MySQL server locally, it would be:5 u/ n4 k. n1 U _0 }
- ---example---
( |3 f7 h8 A& V( ? - [DBEXPRESS]
7 S1 f% b7 ^8 }6 i, m - sqldir=mysql_sql
2 n3 p" t- m5 f' r$ q' G0 ]/ d4 f - Drivername=mysql
- |' |1 q7 c* ~2 a' ^ - Database=test) @/ P6 h3 j) m8 X- l, ^ M9 F! |( s
- Hostname=127.0.0.1
9 x0 ~$ Z$ x# b& }$ N3 O5 C7 A8 ] - User_name=testuser
1 ]5 h, \' R4 ^+ @5 D1 P - Password=my_password
: u- M* O) k/ }7 ?/ u; K& v/ J - GetDriverFunc=getSQLDriverMYSQL
* o1 y$ f$ y7 }2 b3 C% Z - VendorLib=libmysql.dll
0 m; V% S: {, {/ {( D% L5 i4 w - LibraryName=dbexpmysql.dll! _( ~/ J% k9 D- n! p
- Active=1
2 ~0 x2 l* D+ O' x - ---example----' w# ?2 |6 s D5 }6 T) f
- - written 02.03.04 by pwk.linuxfan3 |( }# T; z8 T8 F
$ S. e: Y0 m% y) K6 H4 _
复制代码 |
|