|
|
麻烦翻译一下,下面这段文章:xhan + L9 {! j- E, g8 |# f
: D& V% O+ c* q7 g, g- 0 Y( s; P, m9 x0 M/ o' G
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) j: Z, G8 @% N/ v' h; K
. s( M' B# P# F: [& [1 P- ### What we need ###
9 I+ O8 B7 M/ S% {) i - Naturally, we will need a MySQL server to store the data for us, this document
' Z1 q# Q# ]4 B8 p- Y - will not explain how this can be done - there are documents out there for the / }8 V" m! |9 V1 L8 F' W
- interested. The requirements include a (empty) database for TeamSpeak to use, l( H* o$ [5 w8 h
- and a user account (username + password) that has the permissions to do stuff
% D1 S& ]0 z y& B - with the database. Additionally, you will need a vendor library installed on the. f% l9 k1 s% m% c3 `
- local machine, this came with my MySQL install.
- f" E/ d/ ]" C Z* K - These instructions will not tell you how you might transfer your data from the
+ c' a$ e! N k - SQLite database to the MySQL database, we start with a clean and empty MySQL+ K2 t+ Q. o) \0 c ]# A
- database.
8 k, T1 Z( N' J7 e - Some users have reported ways to import a SQLite database into MySQL, but at; g) o! ~5 n- S
- the time of writing, there are still too many issues - check the current status/ Q; H {& T; U. F; p8 ~
- in the TeamSpeak forums if you are interested.
g* Y% F$ N" ?2 ^$ M( w - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( F6 x2 g0 D, o% y0 G( X7 G - Borland was used. This driver can only interface with the client library that ' M, v. W$ v5 z4 n5 g
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! @" Q7 _4 g" J7 x0 D
- client library - basically all you have to do is to use a 3.x client library as " \7 v" m$ L$ d" H0 N
- "VendorLib" and a 4.x database to connect to.
* H/ v5 W7 \2 k5 f1 a - If you need more info about dbExpress, you can contact Borland.
j) d& ?% D2 h- l - / T! m+ i- i% u' w m' R
- ### Doing the work ### O* \' [* e0 g* ?+ l! @/ |5 j
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' B! j" `+ ^( u% G5 f: e- Z( Q - the perquisites right, just open your server.ini file, and add this section at, ?: G; ?2 W$ o
- the end:2 P @# H/ u9 B- h# z
- ---cut here---5 d4 J2 U* p( z' b8 D- o: i
- [DBEXPRESS]
) J7 ]6 V& V6 S6 f K - sqldir=mysql_sql
% m. }4 C& n @8 B - Drivername=mysql
5 x; b- p2 `8 r3 r - Database=Your_Database_Name_Here
- l/ i. i+ w+ a9 Q K: M4 S# q2 g - Hostname=The_PC_the_MySQL-Server_is_on8 V- T' v- R# ? w7 p8 L
- User_name=User_name_on_the_MySQL-Server
' i3 o$ `2 S4 s - Password=Password_to_go_with_above_user_name
$ u1 u. |" [# Z! K, @0 u/ m - GetDriverFunc=getSQLDriverMYSQL
' O6 I5 X4 x! {; v' {" H- V; k$ _& M) [1 [ - VendorLib=path_pointing_at_your_mysql_vendor_lib
& `( h4 V5 B$ d: \+ ^3 R8 Q* h. Z - LibraryName=path_to_libsqlmy_libary) F4 Q5 h k, g, p
- Active=1, e$ n" ]! s$ Q
- ---cut here---
: J2 E6 u$ X9 }* d8 M - In my environment (a linux box with a MySQL server running locally) I have:
. k' U$ t F6 T+ k, ?, S - ---example---
+ R2 }: P9 V3 u4 a! j" J& y' O - [DBEXPRESS]
$ e6 l" w, i1 | c! G9 z8 J6 A! C( p - sqldir=mysql_sql
( z* i( P+ }$ J& j4 j - Drivername=mysql) r" F* u& u+ V# j1 S2 I* d8 `& i
- Database=test
& A$ y! V# E+ ~" h6 x, y/ _ - Hostname=localhost" f' B7 A: c4 l
- User_name=testuser% r& f& m$ ?8 j4 e, h) }
- Password=my_password# O) p, }' [+ X* b" P5 B6 N
- GetDriverFunc=getSQLDriverMYSQL
! {' U4 a$ H" w& s+ z7 Y2 t- @ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 J9 p# U6 g$ }( [6 n2 Q" C
- LibraryName=./libsqlmy.so
# g6 H2 G9 ~$ R - Active=1
- h" ^1 ?% C/ X+ r8 z3 G+ Z - ---example---! h0 K8 R+ [; e+ m
- $ i$ _7 y& d5 O- V
- On a windows box, also running the MySQL server locally, it would be:
! Z% D$ i' h! ^- f' V7 P8 u7 ?2 V - ---example---
. S9 y7 S6 G( J0 b {$ S - [DBEXPRESS]% g( f& a4 N. k9 H1 ~$ P5 J
- sqldir=mysql_sql0 _' Z2 K4 ]4 D# Q9 E5 S2 c
- Drivername=mysql2 T# O0 W/ T& [ ?/ j! l! x# L# ?
- Database=test
2 h2 y6 k9 o* M' m5 u& I K3 q - Hostname=127.0.0.1
3 k5 U, ^' [$ t9 Z& R+ o0 [. ` - User_name=testuser* L/ K+ ~" f7 l# _( B
- Password=my_password
7 U" n+ \0 ? m" L$ N - GetDriverFunc=getSQLDriverMYSQL
1 C2 d+ F6 Y; ^7 B - VendorLib=libmysql.dll
% V3 k" C8 x( E y5 m8 m( h# R# u - LibraryName=dbexpmysql.dll1 D& ~% M6 C/ }% |
- Active=1
* L# j: a" d9 k - ---example----
# c/ |, i F: w+ m* ? - - written 02.03.04 by pwk.linuxfan h; }8 R5 F" h' L8 }
: H# M. B% W! r/ p
复制代码 |
|