Pages: 9/10 First page Previous page 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]

MYSQL数据库系统的设计架构

[不指定 2008/08/27 09:04 | by askwan ]
通过这幅图学习mysql数据库的系统设计架构
1。Client。包括Mysql Process和Client applications
2。Mysql Server 。包括Mysqld Threads,Storage Engine ,Queay Process ,TCP/IP Threads etc.
3。Database。包括各种Db files
Open in new window

CentOs5上安装Oracle 10g R2

[不指定 2008/07/13 22:14 | by askwan ]
应网友要求,把我安装部署oracle的文档发出来,仅供参考!        
    
                                                    
一. 需要的必须的软件包:

默认安装情况下,可能有些已经安装了
Quotation
[root@server ~]# yum -y install binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs


Quotation
[root@server ~]# yum -y install libstdc++ make  libstdc++.so.5 libXp


二.建立oracle用户和组

Quotation
[root@server ~]# groupadd oinstall
[root@server ~]# groupadd dba
[root@server ~]# useradd -g oinstall -G dba oracle
[root@server ~]# passwd oracle

         mysqlreport 以非常友好的方式显示MySQL状态变量值。和SHOW STATUS不同,mysqlreport以一种非常格式化的方式输出状态值,具有非常好的可读性。
      官方站点是:http://hackmysql.com

安装mysqlreport非常简单

Quotation
#cd /usr/local/sbin
#wget hackmysql.com/scripts/mysqlreport
#chmod 755 mysqlreport


常用选项

Quotation
#mysqlreport --help        
mysqlreport v3.5 Apr 16 2008
mysqlreport makes an easy-to-read report of important MySQL status values.

Command line options (abbreviations work):
   --user USER       Connect to MySQL as USER
   --password PASS   Use PASS or prompt for MySQL user's password
   --host ADDRESS    Connect to MySQL at ADDRESS
   --port PORT       Connect to MySQL at PORT
   --socket SOCKET   Connect to MySQL at SOCKET
   --no-mycnf        Don't read ~/.my.cnf
   --infile FILE     Read status values from FILE instead of MySQL
   --outfile FILE    Write report to FILE
   --email ADDRESS   Email report to ADDRESS (doesn't work on Windows)
   --flush-status    Issue FLUSH STATUS; after getting current values
   --relative X      Generate relative reports. If X is an integer,
                     reports are live from the MySQL server X seconds apart.
                     If X is a list of infiles (file1 file2 etc.),
                     reports are generated from the infiles in the order
                     that they are given.
   --report-count N  Collect N number of live relative reports (default 1)
   --detach          Fork and detach from terminal (run in background)
   --help            Prints this
   --debug           Print debugging information

Visit http://hackmysql.com/mysqlreport for more information.


本文在上篇M-M后,实现Mysql的M-S同步复制

如下图:Open in new window



mysql的安装过程比较简单,这里略过

1.在maste主机上,配置my.cnf
在[mysqld]配置段添加如下字段中增加
Quotation
log-bin=mysql-bin.log
binlog-do-db=blog #要同步的数据库的名字
binlog-do-db=index #要同步的数据库的名字

server-id=1


重启mysql

Quotation
#service mysqld restart
进入mysql中

Quotation
#mysql -u root -ppassword
增加同步帐号
Quotation
mysql>grant replication slave on *.* to 'repication'@'%' identified by 'password';
mysql>use database;
mysql>flush tables with read lock;
mysql>show master status:


Quotation
---------------------------------------------------------------------
| File             | Position | Binlog_Do_DB     | Binlog_Ignore_DB |
+------------------+----------+------------------+------------------+
| mysql-bin.000002 |      1448 | blog,index   |                  |
+------------------+----------+------------------+------------------+

此时不要关闭此终端!
记住上表前两个字段的信息 mysql-bin.000002 和 1448 。
另开一个终端:
Pages: 9/10 First page Previous page 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]