设为首页 加入收藏

TOP

大环境下MySQL5.6源码安装实战一步步教你CentOS6.5_64bit下编译安装MySQL-5.6.23@guoyJoe(二)
2015-11-21 01:31:29 来源: 作者: 【 】 浏览:1
Tags:环境 MySQL5.6 源码 安装 实战 步步 CentOS6.5_64bit 编译 MySQL-5.6.23@guoyJoe
048576000 innodb_log_files_in_group=4 innodb_max_dirty_pages_pct=60 innodb_open_files=60000 innodb_purge_threads=1 innodb_read_io_threads=4 innodb_stats_on_metadata=OFF innodb_support_xa=ON innodb_use_native_aio=OFF innodb_write_io_threads=10 [mysqld_safe] datadir=/u01/my3306/data

?

?

rm -rf /u01/my3306/data/*
rm -rf /u01/my3306/log/iblog/*
rm -rf /u01/my3306/log/binlog/*
chmod -R 777 /u01/my3306/data/
chmod -R 777 /u01/my3306/log/iblog/
chmod -R 777 /u01/my3306/log/binlog/
chmod 755 /u01/my3306/my.cnf

./scripts/mysql_install_db  --defaults-file=/u01/my3306/my.cnf --datadir=/u01/my3306/data --user=mysql

chmod -R 777 /u01/my3306/data/
chmod -R 777 /u01/my3306/log/iblog/
chmod -R 777 /u01/my3306/log/binlog/
说明:defaults-file表示指定默认的配置文件,如果不指定,系统默认的优先级是先使用/etc/my.cnf作为mysql的配置文件,那之前make的那些参数就白设置了.

?

?

?

十三、启动mysql

vi .bash_profile   ---root用户下添加
PATH=$PATH:$HOME/bin:/u01/my3306/bin

mysqld_safe --defaults-file=/u01/my3306/my.cnf --user=mysql &

?

?

[root@uubee8 ~]# mysql -h127.0.0.1 -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.23-log Source distribution

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show variables like '%log-bin%';
Empty set (0.00 sec)

mysql> show variables like '%bin%';
+-----------------------------------------+------------------------------+
| Variable_name                           | Value                        |
+-----------------------------------------+------------------------------+
| bind_address                            | *                            |
| binlog_cache_size                       | 32768                        |
| binlog_checksum                         | CRC32                        |
| binlog_direct_non_transactional_updates | OFF                          |
| binlog_error_action                     | IGNORE_ERROR                 |
| binlog_format                           | ROW                          |
| binlog_gtid_simple_recovery             | OFF                          |
| binlog_max_flush_queue_time             | 0                            |
| binlog_order_commits                    | ON                           |
| binlog_row_image                        | FULL                         |
| binlog_rows_query_log_events            | OFF                          |
| binlog_stmt_cache_size                  | 32768                        |
| binlogging_impossible_mode              | IGNORE_ERROR                 |
| innodb_api_enable_binlog                | OFF                          |
| innodb_locks_unsafe_for_binlog          | OFF                          |
| log_bin                                 | ON                           |
| log_bin_basename                        | /u01/my3306/log/binlog       |
| log_bin_index                           | /u01/my3306/log/binlog.index |
| log_bin_trust_function_creators         | OFF                          |
| log_bin_use_v1_row_events               | OFF                          |
| max_binlog_cache_size                   | 2147483648                   |
| max_binlog_size                         | 524288000                    |
| max_binlog_stmt_cache_size              | 18446744073709547520         |
| simplified_binlog_gtid_recovery         | OFF                          |
| sql_log_bin                             | ON                           |
| sync_binlog                             | 100                          |
+-----------------------------------------+------------------------------+
26 rows in set (0.00 sec)

##################################################################################################################################

?

?

1.初始化MySQL脚本:
sh init3306.sh
rm -rf /u01/my3306/data/*
rm -rf /u01/my3306/log/iblog/*
rm -rf /u01/my3306/log/binlog/*
chmod -R 777 /u01/my3306/data/
chmod -R 777 /u01/my3306/log/iblog/
chmod -R 777 /u01/my3306/log/binlog/
chmod 755 /u01/my3306/my.cnf

./scripts/mysql_install_db  --defa
首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇JAVA中事务的属性ACID; 下一篇【翻译自mos文章】在win2003sp1下..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: