======== Use the source code to install the tar package, without installation -- MySQL-5.6.23 for CentOS6.5 _ 64bit ===@ guoyJoe, centos6.5mysql
Reprinted please indicate the source: http://blog.csdn.net/guoyjoe/article/details/44836547
I. On the basis of installing the source code: I made a tar package:
Cd/u01/myss06
Tar cvzf my3306.tar.
Ii. Disable the Firewall
Chkconfig iptables off
Service iptables stop
Vi/etc/selinux/config
SELINUX = disabled
Iii. Check whether MySQL is installed on the Operating System
[Root @ mydb1 backup] # rpm-qa | grep mysql
Qt-mysql-4.6.2-26.el6_4.x86_64
Mysql-5.1.71-1.el6.x86_64
Mysql-server-5.1.71-1.el6.x86_64
Mysql-devel-5.1.71-1.el6.x86_64
Mysql-libs-5.1.71-1.el6.x86_64
4. Delete MyQL (the mysql-libs that comes with the redhat6.3 Server is a mysql-libs-5.1.61-4.el6.x86_64 and may conflict with the mysql-libs of a later version)
Yum remove mysql-libs
5. Confirm that MySQL-related packages are completely deleted
[Root @ mydb1 backup] # rpm-qa | grep mysql
6. Add users and groups:
Id mysql
Userdel-r mysql
Groupadd mysql # Add User Groups
Useradd-d/home/mysql-g mysql
VII. Configure MySQL Environment Variables
Su-mysql
Vi. bash_profile
PATH = $ PATH: $ HOME/bin:/u01/my3306/bin
Source. bash_profile
8. Decompress
Cd/u01/my3306
Tar-zxvf my3306.tar
9. The following error is reported in the log:
RSA private key file not found:/u01/my3306/data // private_key.pem. Some authentication plugins will not work.
RSA public key file not found:/u01/my3306/data // public_key.pem. Some authentication plugins will not work.
Solution:
1. Check whether openssl is installed
$ Rpm-qa openssl
Openssl-1.0.0-20.el6_2.5.x86_64
2. Use openssl to generate public and private keys
$ Openssl genrsa-out mykey. pem 1024
Generating RSA private key, 1024 bit long modulus
...
. ++
E is 65537 (0x10001)
$ Openssl rsa-in mykey. pem-pubout-out mykey. pub
Writing RSA key
$ Ll mykey *
[Root @ mydb1 my3306] # ll mykey *
-Rwxr-xr-x 1 root 891 Apr 1 mykey. pem
-Rwxr-xr-x 1 root 272 Apr 1 mykey. pub
10. initialize the MySQL script
./Scripts/mysql_install_db -- defaults-file =/u01/my3306/my. cnf -- datadir =/u01/my3306/data -- user = mysql
11. Start mysql
Vi. bash_profile --- add under root user
PATH = $ PATH: $ HOME/bin:/u01/my3306/bin
Mysqld_safe -- defaults-file =/u01/my3306/my. cnf -- user = mysql &
[Root @ mydb3 ~] # Su-mysql
[Mysql @ mydb3 ~] $ 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,201 5, 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 databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Performance_schema |
| Test |
+ -------------------- +
4 rows in set (0.15 sec)
Mysql> show variables like '% log % ';
+ ----------------------------------------- + ------------------------------------- +
| Variable_name | Value |
+ ----------------------------------------- + ------------------------------------- +
| Back_log | 900 |
| Bin log_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 | 1, 32768 |
| Binlogging_impossible_mode | IGNORE_ERROR |
| Expire_logs_days | 7 |
| General_log | OFF |
| General_log_file |/u01/my3306/data/mydb3.log |
| Innodb_api_enable_binlog | OFF |
| Innodb_flush_log_at_timeout | 1 |
| Innodb_flush_log_at_trx_commit | 1 |
| Innodb_locks_unsafe_for_binlog | OFF |
| Innodb_log_buffer_size | 67108864 |
| Innodb_log_compressed_pages | ON |
| Innodb_log_file_size | 1048576000 |
| Innodb_log_files_in_group | 4 |
| Innodb_log_group_home_dir |/u01/my3306/log/iblog |
| Innodb_mirrored_log_groups | 1 |
| Innodb_online_alter_log_max_size | 134217728 |
| Innodb_undo_logs | 128 |
| 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 |
| Log_error |/u01/my3306/log/alert. log |
| Log_output | FILE |
| Log_queries_not_using_indexes | ON |
| Log_slave_updates | ON |
| Log_slow_admin_statements | ON |
| Log_slow_slave_statements | OFF |
| Log_throttle_queries_not_using_indexes | 0 |
| Log_warnings | 1 |
| Max_binlog_cache_size | 2147483648 |
| Max_binlog_size | 524288000 |
| Max_binlog_stmt_cache_size | 1, 18446744073709547520 |
| Max_relay_log_size | 0 |
| Relay_log |/u01/my3306/log/relaylog |
| Relay_log_basename |/u01/my3306/log/relaylog |
| Relay_log_index |/u01/my3306/log/relay. index |
| Relay_log_info_file |/u01/my3306/log/relay-log.info |
| Relay_log_info_repository | FILE |
| Relay_log_purge | ON |
| Relay_log_recovery | OFF |
| Relay_log_space_limit | 0 |
| Simplified_binlog_gtid_recovery | OFF |
| Slow_query_log | ON |
| Slow_query_log_file |/u01/my3306/log/slow. log |
| SQL _log_bin | ON |
| SQL _log_off | OFF |
| Sync_binlog | 100 |
| Sync_relay_logs | 10000 |
| Sync_relay_log_info | 10000 |
+ ----------------------------------------- + ------------------------------------- +
61 rows in set (0.02 sec)
**************************************** **************************************** ***************************
An error may be reported during the installation process. Generally, check the log.
Tail-f/u01/my3306/log/alert. log
Run: mysqld_safe -- defaults-file =/u01/my3306/my. cnf -- user = mysql &
1. Error 1:
19:18:00 4201 [Note] RSA private key file not found:/u01/my3306/data // private_key.pem. Some authentication plugins will not work.
Solution:
Modify the configuration in my. cnf and comment out the following two lines.
[Mysqld]
# Sha256_password_private_key_path =/u01/my3306/mykey. pem
# Sha256_password_public_key_path =/u01/my3306/mykey. pub
2. Run mysqld_safe -- defaults-file =/u01/my3306/my. cnf -- user = mysql &
Error 2:
19:23:36 6109 [ERROR] Can't find messagefile '/u01/my3306/share/mysql/errmsg. sys'
Copy/bak/share/english/errmsg. sys in the source code package to/u01/my3306/share/mysql/errmsg. sys.
Scp/bak/share/english/errmsg. sys 192.168.1.18:/u01/my3306/share/mysql/errmsg. sys
Done !!!!