Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1034080
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类: Mysql/postgreSQL

2015-07-10 12:21:09

[root@timesten mysql]# ll
total 124640
-rw-r--r-- 1 root root 23295625 Jul  2 00:24 MySQL-client-advanced-5.6.25-1.rhel5.x86_64.rpm
-rw-r--r-- 1 root root  4537398 Jul  2 00:24 MySQL-devel-advanced-5.6.25-1.rhel5.x86_64.rpm
-rw-r--r-- 1 root root 99648389 Jul  2 00:25 MySQL-server-advanced-5.6.25-1.rhel5.x86_64.rpm

[root@timesten mysql]# rpm -ivh MySQL-server-advanced-5.6.25-1.rhel5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-advanced  ########################################### [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
2015-07-02 00:25:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-07-02 00:25:59 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4561 ...
2015-07-02 00:25:59 4561 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 00:25:59 4561 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-02 00:25:59 4561 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 00:25:59 4561 [Note] InnoDB: Memory barrier is not used
2015-07-02 00:25:59 4561 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-07-02 00:25:59 4561 [Note] InnoDB: Using Linux native AIO
2015-07-02 00:25:59 4561 [Note] InnoDB: Using CPU crc32 instructions
2015-07-02 00:25:59 4561 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-07-02 00:25:59 4561 [Note] InnoDB: Completed initialization of buffer pool
2015-07-02 00:25:59 4561 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-07-02 00:25:59 4561 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-07-02 00:25:59 4561 [Note] InnoDB: Database physically writes the file full: wait...
2015-07-02 00:25:59 4561 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-07-02 00:25:59 4561 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-07-02 00:26:00 4561 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-07-02 00:26:00 4561 [Warning] InnoDB: New log files created, LSN=45781
2015-07-02 00:26:00 4561 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-07-02 00:26:00 4561 [Note] InnoDB: Doublewrite buffer created
2015-07-02 00:26:00 4561 [Note] InnoDB: 128 rollback segment(s) are active.
2015-07-02 00:26:00 4561 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-07-02 00:26:00 4561 [Note] InnoDB: Foreign key constraint system tables created
2015-07-02 00:26:00 4561 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-07-02 00:26:00 4561 [Note] InnoDB: Tablespace and datafile system tables created.
2015-07-02 00:26:00 4561 [Note] InnoDB: Waiting for purge to start
2015-07-02 00:26:00 4561 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-07-02 00:26:00 4561 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2015-07-02 00:26:00 4561 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
A random root password has been set. You will find it in '/root/.mysql_secret'.
2015-07-02 00:26:00 4561 [Note] Binlog end
2015-07-02 00:26:00 4561 [Note] InnoDB: FTS optimize thread exiting.
2015-07-02 00:26:00 4561 [Note] InnoDB: Starting shutdown...
2015-07-02 00:26:02 4561 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2015-07-02 00:26:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-07-02 00:26:02 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 4584 ...
2015-07-02 00:26:02 4584 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-02 00:26:02 4584 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-02 00:26:02 4584 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-02 00:26:02 4584 [Note] InnoDB: Memory barrier is not used
2015-07-02 00:26:02 4584 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-07-02 00:26:02 4584 [Note] InnoDB: Using Linux native AIO
2015-07-02 00:26:02 4584 [Note] InnoDB: Using CPU crc32 instructions
2015-07-02 00:26:02 4584 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-07-02 00:26:02 4584 [Note] InnoDB: Completed initialization of buffer pool
2015-07-02 00:26:02 4584 [Note] InnoDB: Highest supported file format is Barracuda.
2015-07-02 00:26:02 4584 [Note] InnoDB: 128 rollback segment(s) are active.
2015-07-02 00:26:02 4584 [Note] InnoDB: Waiting for purge to start
2015-07-02 00:26:02 4584 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-07-02 00:26:02 4584 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2015-07-02 00:26:02 4584 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2015-07-02 00:26:02 4584 [Note] Binlog end
2015-07-02 00:26:02 4584 [Note] InnoDB: FTS optimize thread exiting.
2015-07-02 00:26:02 4584 [Note] InnoDB: Starting shutdown...
2015-07-02 00:26:04 4584 [Note] InnoDB: Shutdown completed; log sequence number 1625987




A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

  /usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.
This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at />
The latest information about MySQL is available on the web at

  />
Support MySQL by buying support/licenses at />
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

[root@timesten mysql]#
[root@timesten mysql]# service mysql start
Starting MySQL...                                          [  OK  ]
[root@timesten mysql]#
[root@timesten mysql]# rpm -ivh MySQL-client-advanced-5.6.25-1.rhel5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client-advanced  ########################################### [100%]
[root@timesten mysql]# rpm -ivh MySQL-devel-advanced-5.6.25-1.rhel5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-devel-advanced   ########################################### [100%]
[root@timesten mysql]#

[root@timesten mysql]# cat /root/.mysql_secret
# The random password set for the root user at Thu Jul  2 00:26:00 2015 (local time): Q2QKf5GH3xZiVUdY

[root@timesten mysql]# mysql -uroot -p
Enter password:    

mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password for root@'localhost'=password("oracle");
Query OK, 0 rows affected (0.00 sec)

mysql>

/usr/bin 客户端命令和脚本
/usr/sbin mysqld服务
/var/lib/mysql 默认创建的与数据库相关的文件(日志文件,数据文件)

查看client安装的路径
[root@timesten ~]# rpm -ql MySQL-client-advanced-5.6.25-1.rhel5
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_config_editor
/usr/bin/mysql_find_rows
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqlaccess.conf
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/bin/mysqlslap
/usr/share/doc/MySQL-client-advanced-5.6.25
/usr/share/doc/MySQL-client-advanced-5.6.25/LICENSE.mysql
/usr/share/man/man1/msql2mysql.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysql_config_editor.1.gz
/usr/share/man/man1/mysql_find_rows.1.gz
/usr/share/man/man1/mysql_waitpid.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqlbinlog.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/man/man1/mysqlslap.1.gz

[root@timesten ~]# service mysql status
MySQL running (3968)                                       [  OK  ]



将/usr/share/mysql/my-medium.cnf复制到/etc/my.cnf,
以后修改my.cnf文件来修改mysql的全局设置

vi /etc/my.cnf

character_set_server=utf8
character_set_client=utf8  
collation-server=utf8_general_ci
lower_case_table_names=1
max_connections=1000

---------------------------------------------------
++master
GRANT REPLICATION SLAVE, RELOAD,SUPER on *.* TO timesten1@'192.168.11.%' IDENTIFIED BY 'oracle';

建立一个帐户timesten1,并且只能允许从192.168.11.%这个地址上来登陆,密码是oracle。

++slaver
CHANGE MASTER TO MASTER_HOST='timesten',
MASTER_USER='timesten1',
MASTER_PASSWORD='oracle',
MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=0;

SHOW SLAVE STATUS\G
show processlist \G

阅读(1787) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~