mysql安装一rpm包安装

mysql安装一rpm包安装

centos65上安装mysql一

梳理了一下centos上设置mysql的三种格局:一是通过源码安装,贰是用通用2进制包,三是经过分裂linux
release到系统包安装,centos上是RPM包安装。
先来rpm包装
0
环境
[[email protected]
~]# uname -a
Linux host2 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
[[email protected]
~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m

1
下载

2
检查是还是不是安装
[[email protected]
~]# rpm -qa | grep -i mysql
文件名
MySQL-5.6.22-1.linux_glibc2.5.x86_64.rpm-bundle.tar

3
除去已安装
[[email protected]
~]# rpm -e mysql-libs-5.1.71-1.el6.x86_64 –nodeps
[[email protected]
~]#

4
检查,那样删依然会留给一些东西
[[email protected]
~]# find / -name mysql
[[email protected]
~]# find / -name *mysql*
/etc/selinux/targeted/modules/active/modules/mysql.pp
/usr/lib/python2.6/site-packages/sos/plugins/mysql.pyc
/usr/lib/python2.6/site-packages/sos/plugins/mysql.pyo
/usr/lib/python2.6/site-packages/sos/plugins/mysql.py
/usr/share/vim/vim72/syntax/mysql.vim
/usr/share/selinux/devel/include/services/mysql.if
/usr/share/selinux/targeted/mysql.pp.bz2
/usr/share/doc/rsyslog-5.8.10/rsyslog_mysql.html
/usr/share/doc/rsyslog-5.8.10/ommysql.html
/usr/share/man/man5/mysql_table.5.gz
/usr/lib64/libreoffice/program/libmysqllo.so
/selinux/booleans/allow_user_mysql_connect
/selinux/booleans/mysql_connect_any
/var/lib/yum/yumdb/m/b642f65e3df41063e068158061ae2e08f22e3dad-mysql-libs-5.1.71-1.el6-x86_64

[[email protected]
~]# rpm -qa | grep -i mysql
[[email protected]
~]#

5
查看有否mysql用户和组
[[email protected]
~]# nl /etc/group | grep mysql
[[email protected]
~]# nl /etc/shadow | grep mysql
[[email protected]
~]#

6
解包
[[email protected]
mysql_rpm]# tar -xvf
MySQL-5.6.22-1.linux_glibc2.5.x86_64.rpm-bundle.tar
MySQL-shared-compat-5.6.22-1.linux_glibc2.5.x86_64.rpm #RHEL兼容包
MySQL-client-5.6.22-1.linux_glibc2.5.x86_64.rpm   #MySQL客户端程序
MySQL-shared-5.6.22-1.linux_glibc2.5.x86_64.rpm #MySQL的共享库
MySQL-server-5.6.22-1.linux_glibc2.5.x86_64.rpm #MySQL服务端程序
MySQL-test-5.6.22-1.linux_glibc2.5.x86_64.rpm #MySQL的测试组件
MySQL-devel-5.6.22-1.linux_glibc2.5.x86_64.rpm #MySQL的库和头文件
MySQL-embedded-5.6.22-1.linux_glibc2.5.x86_64.rpm
#MySQL的嵌入式程序
[[email protected]
mysql_rpm]#

7
[[email protected]
mysql_rpm]# rpm -ivh
MySQL-server-5.6.22-1.linux_glibc2.5.x86_64.rpm

[[email protected]
mysql_rpm]# rpm -ivh
MySQL-server-5.6.22-1.linux_glibc2.5.x86_64.rpm
Preparing…
###########################################
[100%]
1:MySQL-server
###########################################
[100%]
warning: user mysql does not exist – using root
warning: group mysql does not exist – using root
2015-01-20 13:10:42 0 [Warning] TIMESTAMP with implicit DEFAULT value
is deprecated. Please use –explicit_defaults_for_timestamp server
option (see documentation for more details).
2015-01-20 13:10:42 5645 [Note] InnoDB: Using atomics to ref count
buffer pool pages
2015-01-20 13:10:42 5645 [Note] InnoDB: The InnoDB memory heap is
disabled
2015-01-20 13:10:42 5645 [Note] InnoDB: Mutexes and rw_locks use GCC
atomic builtins
2015-01-20 13:10:42 5645 [Note] InnoDB: Memory barrier is not used
2015-01-20 13:10:42 5645 [Note] InnoDB: Compressed tables use zlib
1.2.3
2015-01-20 13:10:42 5645 [Note] InnoDB: Using Linux native AIO
2015-01-20 13:10:42 5645 [Note] InnoDB: Not using CPU crc32
instructions
2015-01-20 13:10:42 5645 [Note] InnoDB: Initializing buffer pool, size
= 128.0M
2015-01-20 13:10:42 5645 [Note] InnoDB: Completed initialization of
buffer pool
2015-01-20 13:10:42 5645 [Note] InnoDB: The first specified data file
./ibdata1 did not exist: a new database to be created!
2015-01-20 13:10:42 5645 [Note] InnoDB: Setting file ./ibdata1 size to
12 MB
2015-01-20 13:10:42 5645 [Note] InnoDB: Database physically writes the
file full: wait…
2015-01-20 13:10:42 5645 [Note] InnoDB: Setting log file
./ib_logfile101 size to 48 MB
2015-01-20 13:10:42 5645 [Note] InnoDB: Setting log file
./ib_logfile1 size to 48 MB
2015-01-20 13:10:43 5645 [Note] InnoDB: Renaming log file
./ib_logfile101 to ./ib_logfile0
2015-01-20 13:10:43 5645 [Warning] InnoDB: New log files created,
LSN=45781
2015-01-20 13:10:43 5645 [Note] InnoDB: Doublewrite buffer not found:
creating new
2015-01-20 13:10:43 5645 [Note] InnoDB: Doublewrite buffer created
2015-01-20 13:10:43 5645 [Note] InnoDB: 128 rollback segment(s) are
active.
2015-01-20 13:10:43 5645 [Warning] InnoDB: Creating foreign key
constraint system tables.
2015-01-20 13:10:43 5645 [Note] InnoDB: Foreign key constraint system
tables created
2015-01-20 13:10:43 5645 [Note] InnoDB: Creating tablespace and
datafile system tables.
2015-01-20 13:10:43 5645 [Note] InnoDB: Tablespace and datafile system
tables created.
2015-01-20 13:10:43 5645 [Note] InnoDB: Waiting for purge to start
2015-01-20 13:10:43 5645 [Note] InnoDB: 5.6.22 started; log sequence
number 0
A random root password has been set. You will find it in
‘/root/.mysql_secret’.
2015-01-20 13:10:44 5645 [Note] Binlog end
2015-01-20 13:10:44 5645 [Note] InnoDB: FTS optimize thread exiting.
2015-01-20 13:10:44 5645 [Note] InnoDB: Starting shutdown…
2015-01-20 13:10:45 5645 [Note] InnoDB: Shutdown completed; log
sequence number 1625977

2015-01-20 13:10:45 0 [Warning] TIMESTAMP with implicit DEFAULT value
is deprecated. Please use –explicit_defaults_for_timestamp server
option (see documentation for more details).
2015-01-20 13:10:45 5667 [Note] InnoDB: Using atomics to ref count
buffer pool pages
2015-01-20 13:10:45 5667 [Note] InnoDB: The InnoDB memory heap is
disabled
2015-01-20 13:10:45 5667 [Note] InnoDB: Mutexes and rw_locks use GCC
atomic builtins
2015-01-20 13:10:45 5667 [Note] InnoDB: Memory barrier is not used
2015-01-20 13:10:45 5667 [Note] InnoDB: Compressed tables use zlib
1.2.3
2015-01-20 13:10:45 5667 [Note] InnoDB: Using Linux native AIO
2015-01-20 13:10:45 5667 [Note] InnoDB: Not using CPU crc32
instructions
2015-01-20 13:10:45 5667 [Note] InnoDB: Initializing buffer pool, size
= 128.0M
2015-01-20 13:10:45 5667 [Note] InnoDB: Completed initialization of
buffer pool
2015-01-20 13:10:45 5667 [Note] InnoDB: Highest supported file format
is Barracuda.
2015-01-20 13:10:45 5667 [Note] InnoDB: 128 rollback segment(s) are
active.
2015-01-20 13:10:45 5667 [Note] InnoDB: Waiting for purge to start
2015-01-20 13:10:45 5667 [Note] InnoDB: 5.6.22 started; log sequence
number 1625977
2015-01-20 13:10:45 5667 [Note] Binlog end
2015-01-20 13:10:45 5667 [Note] InnoDB: FTS optimize thread exiting.
2015-01-20 13:10:45 5667 [Note] InnoDB: Starting shutdown…
2015-01-20 13:10:47 5667 [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

[[email protected]
mysql_rpm]#

8
曾经有了mysql用户和组
[[email protected]
mysql_rpm]# id mysql
uid=495(mysql) gid=492(mysql) groups=492(mysql)

[[email protected]
mysql_rpm]# nl /etc/group | grep mysql
60 mysql:x:492:
[[email protected]
mysql_rpm]# cat /etc/group | grep mysql
mysql:x:492:
[[email protected]
mysql_rpm]# cat /etc/shadow | grep mysql
mysql:!!:16455::::::
[[email protected]
mysql_rpm]#

9

RPM安装格局文件遍及

 

Table 2.6 MySQLInstallation Layout for Linux RPM Packages from the
MySQL DeveloperZone

Directory

Contentsof Directory

/usr/bin

Clientprograms and scripts

/usr/sbin

Themysqldserver

/var/lib/mysql

Logfiles, databases

/usr/share/info

Manualin Info format

/usr/share/man

Unixmanual pages

/usr/include/mysql

Include(header) files

/usr/lib/mysql

Libraries

/usr/share/mysql

Miscellaneoussupport files, including error messages, character set files,sample configuration files, SQL for database installation

/usr/share/sql-bench

Benchmarks

10
copy配置文件
# 未有这一步也足以按内置参数
[[email protected]
mysql_rpm]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf
[[email protected]
mysql_rpm]#

11
start
[[email protected]
mysql_rpm]# service mysql status
MySQL is not running [FAILED]
[[email protected]
mysql_rpm]# service mysql start
Starting MySQL.. [ OK ]

11
查验
[[email protected]
mysql_rpm]# netstat -anpl | grep mysql
tcp 0 0 :::3306 :::* LISTEN 5924/mysqld
unix 2 [ ACC ] STREAM LISTENING 76015 5924/mysqld
/var/lib/mysql/mysql.sock
[[email protected]
mysql_rpm]#

12
设置客户端
[[email protected]
mysql_rpm]# rpm -ivh
MySQL-client-5.6.22-1.linux_glibc2.5.x86_64.rpm
Preparing…
###########################################
[100%]
1:MySQL-client
###########################################
[100%]
[[email protected]
mysql_rpm]#

13
连到mysql并修改
[[email protected]
mysql_rpm]# nl /root/.mysql_secret
1 # The random password set for the root user at Tue Jan 20 13:10:43
2015 (local time): F76Wy1A4G9ZuLcaG

[[email protected]
mysql_rpm]# mysql -p mysql
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.22

Copyright (c) 2000, 2014, 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;
ERROR 1820 (HY000): You must SET PASSWORD before executing this
statement
mysql>
mysql> SET PASSWORD = PASSWORD(‘123456’);
Query OK, 0 rows affected (0.31 sec)

mysql> flush privileges;
mysql> \q
Bye
[[email protected]
mysql_rpm]#

附:
如此设置后的公文
[[email protected]
mysql_rpm]# ll /usr/bin/mysql*
-rwxr-xr-x. 1 root root 11558 Nov 21 14:26 /usr/bin/mysqlbug
-rwxr-xr-x. 1 root root 4334 Nov 21 14:26
/usr/bin/mysql_convert_table_format
-rwxr-xr-x. 1 root root 26356 Nov 21 14:26 /usr/bin/mysqld_multi
-rwxr-xr-x. 1 root root 24691 Nov 21 14:26 /usr/bin/mysqld_safe
-rwxr-xr-x. 1 root root 7424 Nov 21 14:26 /usr/bin/mysqldumpslow
-rwxr-xr-x. 1 root root 1366 Nov 21 14:26
/usr/bin/mysql_fix_extensions
-rwxr-xr-x. 1 root root 34938 Nov 21 14:26 /usr/bin/mysqlhotcopy
-rwxr-xr-x. 1 root root 34612 Nov 21 14:26 /usr/bin/mysql_install_db
-rwxr-xr-x. 1 root root 4701102 Nov 21 14:28 /usr/bin/mysql_plugin
-rwxr-xr-x. 1 root root 10106 Nov 21 14:26
/usr/bin/mysql_secure_installation
-rwxr-xr-x. 1 root root 17584 Nov 21 14:26
/usr/bin/mysql_setpermission
-rwxr-xr-x. 1 root root 8681526 Nov 21 14:28 /usr/bin/mysqltest
-rwxr-xr-x. 1 root root 4381081 Nov 21 14:26
/usr/bin/mysql_tzinfo_to_sql
-rwxr-xr-x. 1 root root 4859343 Nov 21 14:28 /usr/bin/mysql_upgrade
-rwxr-xr-x. 1 root root 3976 Nov 21 14:26 /usr/bin/mysql_zap
[[email protected]
mysql_rpm]#

[[email protected]
mysql_rpm]# ll /var/lib/mysql/mysql*
srwxrwxrwx. 1 mysql mysql 0 Jan 20 13:35 /var/lib/mysql/mysql.sock

/var/lib/mysql/mysql:
total 1628
-rw——-. 1 mysql mysql 8820 Jan 20 13:10 columns_priv.frm
-rw——-. 1 mysql mysql 0 Jan 20 13:10 columns_priv.MYD
-rw——-. 1 mysql mysql 4096 Jan 20 13:10 columns_priv.MYI
-rw——-. 1 mysql mysql 9582 Jan 20 13:10 db.frm

[[email protected]
mysql_rpm]# ll /var/lib/mysql/
total 110624
-rw-rw—-. 1 mysql mysql 56 Jan 20 13:35 auto.cnf
-rw-r—–. 1 mysql root 2021 Jan 20 13:35 host2.err
-rw-rw—-. 1 mysql mysql 5 Jan 20 13:35 host2.pid
-rw-rw—-. 1 mysql mysql 12582912 Jan 20 13:35 ibdata1
-rw-rw—-. 1 mysql mysql 50331648 Jan 20 13:35 ib_logfile0
-rw-rw—-. 1 mysql mysql 50331648 Jan 20 13:10 ib_logfile1
drwx–x–x. 2 mysql mysql 4096 Jan 20 13:10 mysql
srwxrwxrwx. 1 mysql mysql 0 Jan 20 13:35 mysql.sock
drwx——. 2 mysql mysql 4096 Jan 20 13:10 performance_schema
-rw-r–r–. 1 root root 122 Jan 20 13:10 RPM_UPGRADE_HISTORY
-rw-r–r–. 1 mysql mysql 122 Jan 20 13:10 RPM_UPGRADE_MARKER-LAST
drwxr-xr-x. 2 mysql mysql 4096 Jan 20 13:10 test
[[email protected]
mysql_rpm]#

[[email protected]
mysql_rpm]# ll /usr/share/
drwxr-xr-x. 28 root root 4096 Jan 20 13:10 mysql

[[email protected]
mysql_rpm]# ll /usr/share/mysql/
total 1504
-rwxr-xr-x. 1 root root 1153 Nov 21 14:26 binary-configure
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 bulgarian
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 charsets
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 czech
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 danish
-rwxr-xr-x. 1 root root 25575 Nov 21 13:39 dictionary.txt
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 dutch
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 english
-rwxr-xr-x. 1 root root 505241 Nov 21 13:39 errmsg-utf8.txt
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 estonian
-rwxr-xr-x. 1 root root 742787 Nov 21 13:40 fill_help_tables.sql
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 french
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 german
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 greek
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 hungarian
-rwxr-xr-x. 1 root root 3963 Nov 21 13:39
innodb_memcached_config.sql
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 italian
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 japanese
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 korean
-rwxr-xr-x. 1 root root 773 Nov 21 13:39 magic
-rwxr-xr-x. 1 root root 1126 Nov 21 14:26 my-default.cnf
-rwxr-xr-x. 1 root root 1061 Nov 21 14:26 mysqld_multi.server
-rwxr-xr-x. 1 root root 844 Nov 21 14:26 mysql-log-rotate
-rwxr-xr-x. 1 root root 1695 Nov 21 13:39
mysql_security_commands.sql
-rwxr-xr-x. 1 root root 10815 Nov 21 14:26 mysql.server
-rwxr-xr-x. 1 root root 3464 Nov 21 13:39
mysql_system_tables_data.sql
-rwxr-xr-x. 1 root root 93220 Nov 21 13:39 mysql_system_tables.sql
-rwxr-xr-x. 1 root root 10410 Nov 21 13:39
mysql_test_data_timezone.sql
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 norwegian
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 norwegian-ny
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 polish
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 portuguese
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 romanian
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 russian
drwxr-xr-x. 3 root root 4096 Jan 20 13:10 SELinux
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 serbian
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 slovak
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 spanish
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 swedish
drwxr-xr-x. 2 root root 4096 Jan 20 13:10 ukrainian
[[email protected]
mysql_rpm]#

centos陆五上安装mysql一梳理了一下centos上设置mysql的三种情势:一是通过源码安装,贰是用通用贰进制包,三是经过不一致…

从现年三月份启幕mysql官方网址伊始颁发有关的伍.陆层层的逐条版本,对于mysql5.陆种种的版本对伙同的版本实行了全局性的细节性坚实;个人认为,以下是在虚拟机中布局的mysql伍.陆.10源码安装的进程分享记录下:

mysql5.6版本的装置配置进程

[[email protected]
~]# groupadd mysql
[[email protected]
~]# useradd -r -g mysql mysql
[[email protected]
~]# ls
anaconda-ks.cfg install.log install.log.syslog mysql-5.6.10.tar.gz
[[email protected]
~]# cd /usr/local/
[[email protected]
local]# ls
bin etc games include lib libexec sbin share src
[[email protected]
local]# cp /root/mysql-5.6.10.tar.gz /usr/local/
[[email protected]
local]# ll
total 34468
drwxr-xr-x 2 root root 4096 Jan 27 2010 bin
drwxr-xr-x 2 root root 4096 Jan 27 2010 etc
drwxr-xr-x 2 root root 4096 Jan 27 2010 games
drwxr-xr-x 2 root root 4096 Jan 27 2010 include
drwxr-xr-x 2 root root 4096 Jan 27 2010 lib
drwxr-xr-x 2 root root 4096 Jan 27 2010 libexec
-rw-r–r– 1 root root 35174149 Apr 17 00:55 mysql-5.6.10.tar.gz
drwxr-xr-x 2 root root 4096 Jan 27 2010 sbin
drwxr-xr-x 4 root root 4096 Apr 17 00:32 share
drwxr-xr-x 2 root root 4096 Jan 27 2010 src
[[email protected]
local]# tar -zxvf mysql-5.6.10.tar.gz
[[email protected]
local]# cd mysql-5.6.10
cmake .
make && make install

 

[[email protected]
mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql
[[email protected]
mysql-5.6.10]#
[[email protected]
mysql-5.6.10]# cd /usr/local/mysql/scripts/
[[email protected]
scripts]# ./mysql_install_db –user=mysql –basedir=/usr/local/mys
ql –datadir=/usr/local/mysql/data
Installing MySQL system tables…2013-04-17 01:26:58 0 [Warning]
TIMESTAMP with implicit DEFAULT value is deprecated. Please use
–explicit_defaults_for_timestamp server option (see documentation
for more details).
2013-04-17 01:26:58 18715 [Note] InnoDB: The InnoDB memory heap is
disabled
2013-04-17 01:26:58 18715 [Note] InnoDB: Mutexes and rw_locks use
InnoDB’s own implementation
2013-04-17 01:26:58 18715 [Note] InnoDB: Compressed tables use zlib
1.2.3
2013-04-17 01:26:58 18715 [Note] InnoDB: CPU does not support crc32
instructions
2013-04-17 01:26:58 18715 [Note] InnoDB: Initializing buffer pool,
size = 128.0M
2013-04-17 01:26:58 18715 [Note] InnoDB: Completed initialization of
buffer pool
2013-04-17 01:26:58 18715 [Note] InnoDB: The first specified data file
./ibdata1 did not exist: a new database to be created!
2013-04-17 01:26:59 18715 [Note] InnoDB: Setting file ./ibdata1 size
to 12 MB
2013-04-17 01:26:59 18715 [Note] InnoDB: Database physically writes
the file full: wait…
2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file
./ib_logfile101 size to 48 MB
2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file
./ib_logfile1 size to 48 MB
2013-04-17 01:26:59 18715 [Note] InnoDB: Renaming log file
./ib_logfile101 to ./ib_logfile0
2013-04-17 01:26:59 18715 [Warning] InnoDB: New log files created,
LSN=45781
2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer not found:
creating new
2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer created
2013-04-17 01:26:59 18715 [Note] InnoDB: 128 rollback segment(s) are
active.
2013-04-17 01:26:59 18715 [Warning] InnoDB: Creating foreign key
constraint system tables.
2013-04-17 01:26:59 18715 [Note] InnoDB: Foreign key constraint system
tables created
2013-04-17 01:26:59 18715 [Note] InnoDB: Creating tablespace and
datafile system tables.
2013-04-17 01:26:59 18715 [Note] InnoDB: Tablespace and datafile
system tables created.
2013-04-17 01:26:59 18715 [Note] InnoDB: Waiting for purge to start
2013-04-17 01:26:59 18715 [Note] InnoDB: 1.2.10 started; log sequence
number 0
2013-04-17 01:26:59 18715 [Note] Binlog end
2013-04-17 01:26:59 18715 [Note] InnoDB: FTS optimize thread
exiting.
2013-04-17 01:26:59 18715 [Note] InnoDB: Starting shutdown…
2013-04-17 01:27:00 18715 [Note] InnoDB: Shutdown completed; log
sequence number 1625977
OK

从现年6月份开班mysql官方网址开头透露有关的5.6多元的相继版本,对于mysql伍.陆密密麻麻的版本对伙同的版本进行了全局性的细节性抓牢;个人感到,以下是在虚拟机中配置的mysql5.陆.十源码安装的经过分享记录下:

Filling help tables…2013-04-17 01:27:00 0 [Warning] TIMESTAMP with
implicit DEFAULT value is deprecated. Please use
–explicit_defaults_for_timestamp server option (see documentation
for more details).
2013-04-17 01:27:00 18738 [Note] InnoDB: The InnoDB memory heap is
disabled
2013-04-17 01:27:00 18738 [Note] InnoDB: Mutexes and rw_locks use
InnoDB’s own implementation
2013-04-17 01:27:00 18738 [Note] InnoDB: Compressed tables use zlib
1.2.3
2013-04-17 01:27:00 18738 [Note] InnoDB: CPU does not support crc32
instructions
2013-04-17 01:27:00 18738 [Note] InnoDB: Initializing buffer pool,
size = 128.0M
2013-04-17 01:27:00 18738 [Note] InnoDB: Completed initialization of
buffer pool
2013-04-17 01:27:00 18738 [Note] InnoDB: Highest supported file format
is Barracuda.
2013-04-17 01:27:00 18738 [Note] InnoDB: 128 rollback segment(s) are
active.
2013-04-17 01:27:00 18738 [Note] InnoDB: Waiting for purge to start
2013-04-17 01:27:01 18738 [Note] InnoDB: 1.2.10 started; log sequence
number 1625977
2013-04-17 01:27:01 18738 [Note] Binlog end
2013-04-17 01:27:01 18738 [Note] InnoDB: FTS optimize thread
exiting.
2013-04-17 01:27:01 18738 [Note] InnoDB: Starting shutdown…
2013-04-17 01:27:02 18738 [Note] InnoDB: Shutdown completed; log
sequence number 1625987
OK

[html] 

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

[[email protected]
~]# groupadd mysql  

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

[[email protected]
~]# useradd -r -g mysql mysql  

/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’
/usr/local/mysql/bin/mysqladmin -u root -h mysql5.6 password
‘new-password’

[[email protected]
~]# ls  

Alternatively you can run:

anaconda-ks.cfg  install.log  install.log.syslog  mysql-5.6.10.tar.gz  

/usr/local/mysql/bin/mysql_secure_installation

[[email protected]
~]# cd /usr/local/  

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

[[email protected]
local]# ls  

See the manual for more instructions.

bin  etc  games  include  lib  libexec  sbin  share  src  

You can start the MySQL daemon with:

[[email protected]
local]# cp /root/mysql-5.6.10.tar.gz  /usr/local/  

cd . ; /usr/local/mysql/bin/mysqld_safe &

[[email protected]
local]# ll  

You can test the MySQL daemon with mysql-test-run.pl

total 34468  

cd mysql-test ; perl mysql-test-run.pl

drwxr-xr-x 2 root root     4096 Jan 27  2010 bin  

Please report any problems with the ./bin/mysqlbug script!

drwxr-xr-x 2 root root     4096 Jan 27  2010 etc  

The latest information about MySQL is available on the web at

drwxr-xr-x 2 root root     4096 Jan 27  2010 games  

drwxr-xr-x 2 root root     4096 Jan 27  2010 include  

Support MySQL by buying support/licenses at

drwxr-xr-x 2 root root     4096 Jan 27  2010 lib  

New default config file was created as /usr/local/mysql/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

drwxr-xr-x 2 root root     4096 Jan 27  2010 libexec  

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
–defaults-file argument to mysqld_safe when starting the server

-rw-r–r– 1 root root 35174149 Apr 17 00:55 mysql-5.6.10.tar.gz  

[[email protected]
scripts]#
[[email protected]
scripts]# cd /usr/local/mysql/support-files/
[[email protected]
support-files]# cp mysql.server /etc/rc.d/init.d/mysql
[[email protected]
support-files]# cp my-default.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf’? y
[[email protected]
support-files]#
[[email protected]
support-files]# chkconfig -add mysql
-add: unknown option
[[email protected]
support-files]# chkconfig –add mysql
[[email protected]
support-files]# chkconfig mysql on
[[email protected]
support-files]# service mysql start
Starting MySQL. [ OK ]
[[email protected]
support-files]#
[[email protected]
data]# mysql -u mysql -p -S /tmp/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10 Source distribution

drwxr-xr-x 2 root root     4096 Jan 27  2010 sbin  

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

drwxr-xr-x 4 root root     4096 Apr 17 00:32 share  

mysql>

drwxr-xr-x 2 root root     4096 Jan 27  2010 src  

mysql> status;

mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using
readline 5.1

Connection id: 1
Current database:
Current user:
[email protected]
SSL: Not in use
Current pager: stdout
Using outfile: ”
Using delimiter: ;
Server version: 5.6.10 Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 3 min 38 sec

Threads: 1 Questions: 5 Slow queries: 0 Opens: 67 Flush tables: 1 Open

[[email protected]
local]#  tar -zxvf mysql-5.6.10.tar.gz  

tables: 60 Queries per second avg: 0.022

mysql>

[[email protected]
local]# cd mysql-5.6.10   

cmake .   

make && make install   

  

[[email protected]
mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql  

[[email protected]
mysql-5.6.10]#  

[[email protected]
mysql-5.6.10]# cd /usr/local/mysql/scripts/  

[[email protected]
scripts]# ./mysql_install_db  –user=mysql –basedir=/usr/local/mys
 

ql –datadir=/usr/local/mysql/data  

Installing MySQL system tables…2013-04-17 01:26:58 0 [Warning]
TIMESTAMP with implicit DEFAULT value is deprecated. Please use
–explicit_defaults_for_timestamp server option (see documentation
for more details).  

2013-04-17 01:26:58 18715 [Note] InnoDB: The InnoDB memory heap is
disabled  

2013-04-17 01:26:58 18715 [Note] InnoDB: Mutexes and rw_locks use
InnoDB’s own implementation  

2013-04-17 01:26:58 18715 [Note] InnoDB: Compressed tables use zlib
1.2.3  

2013-04-17 01:26:58 18715 [Note] InnoDB: CPU does not support crc32
instructions  

2013-04-17 01:26:58 18715 [Note] InnoDB: Initializing buffer pool,
size = 128.0M  

2013-04-17 01:26:58 18715 [Note] InnoDB: Completed initialization of
buffer pool  

2013-04-17 01:26:58 18715 [Note] InnoDB: The first specified data file
./ibdata1 did not exist: a new database to be created!  

2013-04-17 01:26:59 18715 [Note] InnoDB: Setting file ./ibdata1 size
to 12 MB  

2013-04-17 01:26:59 18715 [Note] InnoDB: Database physically writes
the file full: wait…  

2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file
./ib_logfile101 size to 48 MB  

2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file
./ib_logfile1 size to 48 MB  

2013-04-17 01:26:59 18715 [Note] InnoDB: Renaming log file
./ib_logfile101 to ./ib_logfile0  

2013-04-17 01:26:59 18715 [Warning] InnoDB: New log files created,
LSN=45781  

2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer not found:
creating new  

2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer created  

2013-04-17 01:26:59 18715 [Note] InnoDB: 128 rollback segment(s) are
active.  

2013-04-17 01:26:59 18715 [Warning] InnoDB: Creating foreign key
constraint system tables.  

2013-04-17 01:26:59 18715 [Note] InnoDB: Foreign key constraint system
tables created  

2013-04-17 01:26:59 18715 [Note] InnoDB: Creating tablespace and
datafile system tables.  

2013-04-17 01:26:59 18715 [Note] InnoDB: Tablespace and datafile
system tables created.  

2013-04-17 01:26:59 18715 [Note] InnoDB: Waiting for purge to start  

2013-04-17 01:26:59 18715 [Note] InnoDB: 1.2.10 started; log sequence
number 0