Mysql6.5二进制安装

操作系统
Oracle linux Server release 6.3
数据库
MySQL5.6
#添加mysql用户和组
[root@localhost App]# groupadd mysql
[root@localhost app]# useradd -g mysql mysql
[root@localhost app]#tar zxvf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
[root@localhost app]# ls
mysql-5.6.12-linux-glibc2.5-x86_64 oracle
mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
[root@localhost app]# mv mysql-5.6.12-linux-glibc2.5-x86_64 mysql
[root@localhost app]# chown mysql:mysql mysql
[root@localhost app]# pwd
/app
[root@localhost app]# cd mysql
#初始化mysql库
[root@localhost mysql]# scripts/mysql_install_db --user=mysql --basedir=/app/mysql --datadir=/mydata/
Installing MySQL system tables...2015-05-01 18:31:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-05-01 18:31:07 7432 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-01 18:31:07 7432 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-01 18:31:07 7432 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-01 18:31:07 7432 [Note] InnoDB: Using Linux native AIO
2015-05-01 18:31:07 7432 [Note] InnoDB: Using CPU crc32 instructions
2015-05-01 18:31:07 7432 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-01 18:31:07 7432 [Note] InnoDB: Completed initialization of buffer pool
2015-05-01 18:31:07 7432 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-05-01 18:31:07 7432 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-05-01 18:31:07 7432 [Note] InnoDB: Database physically writes the file full: wait...
2015-05-01 18:31:08 7432 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-05-01 18:31:08 7432 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-05-01 18:31:10 7432 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-05-01 18:31:10 7432 [Warning] InnoDB: New log files created, LSN=45781
2015-05-01 18:31:10 7432 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-05-01 18:31:10 7432 [Note] InnoDB: Doublewrite buffer created
2015-05-01 18:31:10 7432 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-01 18:31:10 7432 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-05-01 18:31:10 7432 [Note] InnoDB: Foreign key constraint system tables created
2015-05-01 18:31:10 7432 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-05-01 18:31:10 7432 [Note] InnoDB: Tablespace and datafile system tables created.
2015-05-01 18:31:10 7432 [Note] InnoDB: Waiting for purge to start
2015-05-01 18:31:10 7432 [Note] InnoDB: 5.6.12 started; log sequence number 0
2015-05-01 18:31:11 7432 [Note] Binlog end
2015-05-01 18:31:11 7432 [Note] InnoDB: FTS optimize thread exiting.
2015-05-01 18:31:11 7432 [Note] InnoDB: Starting shutdown...
2015-05-01 18:31:12 7432 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2015-05-01 18:31:12 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-05-01 18:31:12 7455 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-01 18:31:12 7455 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-01 18:31:12 7455 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-01 18:31:12 7455 [Note] InnoDB: Using Linux native AIO
2015-05-01 18:31:12 7455 [Note] InnoDB: Using CPU crc32 instructions
2015-05-01 18:31:12 7455 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-01 18:31:12 7455 [Note] InnoDB: Completed initialization of buffer pool
2015-05-01 18:31:12 7455 [Note] InnoDB: Highest supported file format is Barracuda.
2015-05-01 18:31:12 7455 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-01 18:31:12 7455 [Note] InnoDB: Waiting for purge to start
2015-05-01 18:31:12 7455 [Note] InnoDB: 5.6.12 started; log sequence number 1625977
2015-05-01 18:31:12 7455 [Note] Binlog end
2015-05-01 18:31:12 7455 [Note] InnoDB: FTS optimize thread exiting.
2015-05-01 18:31:12 7455 [Note] InnoDB: Starting shutdown...
2015-05-01 18:31:14 7455 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSword FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/app/mysql/bin/mysqladmin -u root password 'new-password'
/app/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'


推荐阅读