|
|
麻烦翻译一下,下面这段文章:xhan ! P- K" H! ~$ }( N1 z
+ Y4 h! q2 B9 ^) ~2 _0 R, T; e-
T& z& l7 S* V7 D/ Z; |2 H - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# M' D d" J, C b! { - $ s: Z4 @( S4 S; S3 S# ]. v
- ### What we need #### F% J y# y6 }8 N: F
- Naturally, we will need a MySQL server to store the data for us, this document
4 ^% n. x% ~* H; O7 o6 x" X - will not explain how this can be done - there are documents out there for the
) c( _/ x" A, Q; ]6 N% t, @% ~ - interested. The requirements include a (empty) database for TeamSpeak to use$ Y1 @/ C- `9 `) F8 {8 o5 r
- and a user account (username + password) that has the permissions to do stuff5 h7 q! S1 i2 Z3 ^
- with the database. Additionally, you will need a vendor library installed on the4 }, Y' t8 {' A1 E3 w1 q1 {& _
- local machine, this came with my MySQL install.
6 ~* U$ W1 a+ l9 @ - These instructions will not tell you how you might transfer your data from the
* ~. g! q% u- ?& d2 t - SQLite database to the MySQL database, we start with a clean and empty MySQL
. }5 G3 d6 W' T" q* ^ - database.
: S8 T d+ w4 N& D5 Y - Some users have reported ways to import a SQLite database into MySQL, but at1 t4 g B2 S2 q$ ?) a
- the time of writing, there are still too many issues - check the current status. z* f& e: U5 \ z `) h- x
- in the TeamSpeak forums if you are interested.
& ~+ o X7 q E% Z3 C& b3 @ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 l: s' s/ G2 y U
- Borland was used. This driver can only interface with the client library that
" p: c }* i% j2 K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ l1 z) {+ z3 g( `4 ^/ B - client library - basically all you have to do is to use a 3.x client library as * I3 n2 T3 b: Q/ f
- "VendorLib" and a 4.x database to connect to.% E! d4 h9 o* a' w3 g" B
- If you need more info about dbExpress, you can contact Borland.3 l# w7 n7 r( E, S) y6 v4 _) m5 [
- 7 |/ @/ T9 \6 ~
- ### Doing the work ###: R) ^4 C8 Z( ]' O. f1 J6 i5 P
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 y. M6 q" a M. W1 K# K
- the perquisites right, just open your server.ini file, and add this section at
$ B2 K) `5 K- K9 ?7 { - the end:7 B$ b5 O: f: [& t
- ---cut here---
( D7 x! @$ R* H8 C' k+ z' p1 u - [DBEXPRESS] r: ~/ e6 O* \/ E9 k$ j
- sqldir=mysql_sql! }$ ^7 B: r1 }1 I5 r) R- j) a* i
- Drivername=mysql
7 ^; I$ Q5 ~4 t! O0 j - Database=Your_Database_Name_Here `! C$ d1 c: s9 p
- Hostname=The_PC_the_MySQL-Server_is_on
+ ^6 h% G# F8 f3 D - User_name=User_name_on_the_MySQL-Server
+ Z! V( D7 y' m2 B7 D3 h% n: y - Password=Password_to_go_with_above_user_name! r9 I: Z0 N' i' Q. t7 g4 j8 B4 E
- GetDriverFunc=getSQLDriverMYSQL
/ O0 t- @, e& X) i" I* l s - VendorLib=path_pointing_at_your_mysql_vendor_lib
: f( h) F" n+ ^) k9 q, x% |$ K - LibraryName=path_to_libsqlmy_libary
% b4 B& c4 s% p j0 W. {; k+ E5 G - Active=1; j1 V- k0 F' Z" ]
- ---cut here---
' l. C5 @" x0 F7 l - In my environment (a linux box with a MySQL server running locally) I have:$ F; r( E' `7 \) s, d) `
- ---example---
- s. r" A: @, E8 ~7 B- `4 G - [DBEXPRESS]) Y' t1 D1 Q! u6 _9 y6 U# c5 o, q
- sqldir=mysql_sql5 i7 B5 @$ O9 E0 t9 N& L5 h
- Drivername=mysql% h9 W. _* {9 u' p& s" i G
- Database=test, u* _! O! H& i$ m7 C$ b3 A
- Hostname=localhost" X- g1 E4 J1 P$ s) K& w
- User_name=testuser( C* c8 S' r" o; Q u; j5 _4 A
- Password=my_password, B8 x! s! |8 H1 T9 w. E4 T
- GetDriverFunc=getSQLDriverMYSQL
k2 w2 ?% M7 y+ I- d1 Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" O" @# O7 \: f7 e
- LibraryName=./libsqlmy.so
4 W0 m# }# J* Y( _, c7 }4 Q' K - Active=1
% d, o2 T" G% Y# n1 j8 w- o - ---example---2 P# v/ U5 U. i1 j9 ?0 b; \
- p; T& u. J7 B/ _- g
- On a windows box, also running the MySQL server locally, it would be:
3 ~5 U( R2 o: F, e8 f# n8 v - ---example---
# G) j5 l$ I( _* O0 t4 k8 `# G - [DBEXPRESS]
0 ~: T6 l9 I8 M, G. y" E - sqldir=mysql_sql
0 B6 x6 ^! Y# I5 B - Drivername=mysql* i! J1 \! R" W
- Database=test: x5 X& n- D4 t& `' z1 F
- Hostname=127.0.0.15 s' x: h$ R3 {9 P. M4 ^
- User_name=testuser
# s7 j+ L7 g7 h% k0 E - Password=my_password6 t8 H+ \3 p J. B
- GetDriverFunc=getSQLDriverMYSQL7 D( |+ w+ u+ s$ B+ r" U9 R
- VendorLib=libmysql.dll
9 Z+ M* S" n' ]$ { - LibraryName=dbexpmysql.dll
* o3 G( G7 t* x& `' H$ Q - Active=1 V, o6 s5 }; q! l! w. e4 g8 Q+ i9 t
- ---example----+ ^2 k4 M1 r6 K. m" U; v' d1 ~6 I! a
- - written 02.03.04 by pwk.linuxfan% I$ X9 n, T& v3 R* u; e* \
- 1 n K- T2 [6 R
复制代码 |
|