wget http://dev.mysql.com/get/downloads/mysql-5.6/mysql-5.6.13.tar.gz/from/http://cdn.mysql.com/
ok,成功了,对linux底层不太熟悉,难道是因为前面没有事先安装好各种包而cmake出来错误的东西导致后面继续cmake就一直报错吗? 是否是需要准备好各种lib包然后才能yum install cmake呢?然后再安装mysql才能不报错呢?
ll /usr/local/mysql56/
cd /usr/local/mysql56/
chown -r mysql .
chgrp -r mysql .
cp support-files/my-default.cnf /etc/my56.cnf
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql56 --datadir=/data56 --defaults-file=/etc/my56.cnf
[root@472322 mysql56]# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql56 --datadir=/data56 --defaults-file=/etc/my56.cnf
installing mysql system tables...2013-08-22 05:06:03 0 [warning] timestamp with implicit default value is deprecated. please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-08-22 05:06:03 19416 [note]
innodb: the innodb memory heap is disabled
2013-08-22 05:06:03 19416 [note] innodb: mutexes and rw_locks use gcc atomic builtins
2013-08-22 05:06:03 19416 [note] innodb: compressed tables use zlib 1.2.3
2013-08-22 05:06:03 19416 [note] innodb: using cpu crc32 instructions
2013-08-22 05:06:03 19416 [note] innodb: initializing buffer pool, size = 128.0m
2013-08-22 05:06:03 19416 [note] innodb: completed initialization of buffer pool
2013-08-22 05:06:03 19416 [note] innodb: the first specified data file ./ibdata1 did not exist: a new database to be created!
2013-08-22 05:06:03 19416 [note] innodb: setting file ./ibdata1 size to 12 mb
2013-08-22 05:06:03 19416 [note] innodb: database physically writes the file full: wait...
2013-08-22 05:06:03 19416 [note] innodb: setting log file ./ib_logfile101 size to 48 mb
2013-08-22 05:06:03 19416 [note] innodb: setting log file ./ib_logfile1 size to 48 mb
2013-08-22 05:06:03 19416 [note] innodb: renaming log file ./ib_logfile101 to ./ib_logfile0
2013-08-22 05:06:03 19416 [warning] innodb: new log files created, lsn=45781
2013-08-22 05:06:03 19416 [note] innodb: doublewrite buffer not found: creating new
2013-08-22 05:06:03 19416 [note] innodb: doublewrite buffer created
2013-08-22 05:06:03 19416 [note] innodb: 128 rollback segment(s) are active.
2013-08-22 05:06:03 19416 [warning] innodb: creating foreign key constraint system tables.
2013-08-22 05:06:03 19416 [note] innodb: foreign key constraint system tables created
2013-08-22 05:06:03 19416 [note] innodb: creating tablespace and datafile system tables.
2013-08-22 05:06:03 19416 [note] innodb: tablespace and datafile system tables created.
2013-08-22 05:06:03 19416 [note] innodb: waiting for purge to start
2013-08-22 05:06:03 19416 [note] innodb: 5.6.13 started; log sequence number 0
2013-08-22 05:06:04 19416 [note] binlog end
2013-08-22 05:06:04 19416 [note] innodb: fts optimize thread exiting.
2013-08-22 05:06:04 19416 [note] innodb: starting shutdown...
2013-08-22 05:06:05 19416 [note] innodb: shutdown completed; log sequence number 1625977
ok
filling help tables...2013-08-22 05:06:05 0 [warning] timestamp with implicit default value is deprecated. please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-08-22 05:06:05 19439 [note] innodb: the innodb memory heap is disabled
2013-08-22 05:06:05 19439 [note] innodb: mutexes and rw_locks use gcc atomic builtins
2013-08-22 05:06:05 19439 [note] innodb: compressed tables use zlib 1.2.3
2013-08-22 05:06:05 19439 [note] innodb: using cpu crc32 instructions
2013-08-22 05:06:05 19439 [note] innodb: initializing buffer pool, size = 128.0m
2013-08-22 05:06:05 19439 [note] innodb: completed initialization of buffer pool
2013-08-22 05:06:05 19439 [note] innodb: highest supported file format is barracuda.
2013-08-22 05:06:05 19439 [note] innodb: 128 rollback segment(s) are active.
2013-08-22 05:06:05 19439 [note] innodb: waiting for purge to start
2013-08-22 05:06:05 19439 [note] innodb: 5.6.13 started; log sequence number 1625977
2013-08-22 05:06:05 19439 [note] binlog end
2013-08-22 05:06:05 19439 [note] innodb: fts optimize thread exiting.
2013-08-22 05:06:05 19439 [note] innodb: starting shutdown...
2013-08-22 05:06:06 19439 [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:
/usr/local/mysql56/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql56/bin/mysqladmin -u root -h 472322.ea.com password 'new-password'
alternatively you can run:
/usr/local/mysql56/bin/mysql_secure_installation
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.
see the manual for more instructions.
you can start the mysql daemon with:
cd . ; /usr/local/mysql56/bin/mysqld_safe &
you can test the mysql daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
please report any problems with the ./bin/mysqlbug script!
the latest information about mysql is available on the web at
http://www.mysql.com
support mysql by buying support/licenses at http://shop.mysql.com
new default config file was created as /usr/local/mysql56/my.cnf and
will be used by default by the server when you start it.
you may edit this file to change server settings
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
感到信息有warning,那就重新再执行一遍,原来在做5.6.10安装测试的时候,init db不管第一次执行失败或者成功,都可以再执行第二遍的。
[root@472322 mysql56]#
[root@472322 mysql56]# ll etc/my56.cnf
ls: cannot access etc/my56.cnf: no such file or directory
[root@472322 mysql56]# ll /etc/my56.cnf
-rw-r--r-- 1 root root 1126 aug 22 05:05 /etc/my56.cnf
[root@472322 mysql56]# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql56 --datadir=/data56 --defaults-file=/etc/my56.cnf
installing mysql system tables...2013-08-22 05:07:31 0 [warning] timestamp with implicit default value is deprecated. please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-08-22 05:07:31 19481 [note] innodb: the innodb memory heap is disabled
2013-08-22 05:07:31 19481 [note] innodb: mutexes and rw_locks use gcc atomic builtins
2013-08-22 05:07:31 19481 [note] innodb: compressed tables use zlib 1.2.3
2013-08-22 05:07:31 19481 [note] innodb: using cpu crc32 instructions
2013-08-22 05:07:31 19481 [note] innodb: initializing buffer pool, size = 128.0m
2013-08-22 05:07:31 19481 [note] innodb: completed initialization of buffer pool
2013-08-22 05:07:31 19481 [note] innodb: highest supported file format is barracuda.
2013-08-22 05:07:31 19481 [note] innodb: 128 rollback segment(s) are active.
2013-08-22 05:07:31 19481 [note] innodb: waiting for purge to start
2013-08-22 05:07:31 19481 [note] innodb: 5.6.13 started; log sequence number 1625987
2013-08-22 05:07:31 19481 [note] binlog end
2013-08-22 05:07:31 19481 [note] innodb: fts optimize thread exiting.
2013-08-22 05:07:31 19481 [note] innodb: starting shutdown...
2013-08-22 05:07:32 19481 [note] innodb: shutdown completed; log sequence number 1625997
ok
filling help tables...2013-08-22 05:07:32 0 [warning] timestamp with implicit default value is deprecated. please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-08-22 05:07:32 19505 [note] innodb: the innodb memory heap is disabled
2013-08-22 05:07:32 19505 [note] innodb: mutexes and rw_locks use gcc atomic builtins
2013-08-22 05:07:32 19505 [note] innodb: compressed tables use zlib 1.2.3
2013-08-22 05:07:32 19505 [note] innodb: using cpu crc32 instructions
2013-08-22 05:07:32 19505 [note] innodb: initializing buffer pool, size = 128.0m
2013-08-22 05:07:32 19505 [note] innodb: completed initialization of buffer pool
2013-08-22 05:07:32 19505 [note] innodb: highest supported file format is barracuda.
2013-08-22 05:07:32 19505 [note] innodb: 128 rollback segment(s) are active.
2013-08-22 05:07:32 19505 [note] innodb: waiting for purge to start
2013-08-22 05:07:32 19505 [note] innodb: 5.6.13 started; log sequence number 1625997
2013-08-22 05:07:32 19505 [note] binlog end
2013-08-22 05:07:32 19505 [note] innodb: fts optimize thread exiting.
2013-08-22 05:07:32 19505 [note] innodb: starting shutdown...
2013-08-22 05:07:34 19505 [note] innodb: shutdown completed; log sequence number 1626007
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:
/usr/local/mysql56/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql56/bin/mysqladmin -u root -h 472322.ea.com password 'new-password'
alternatively you can run:
/usr/local/mysql56/bin/mysql_secure_installation
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.
see the manual for more instructions.
you can start the mysql daemon with:
cd . ; /usr/local/mysql56/bin/mysqld_safe &
you can test the mysql daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
please report any problems with the ./bin/mysqlbug script!
the latest information about mysql is available on the web at
http://www.mysql.com
support mysql by buying support/licenses at http://shop.mysql.com
warning: found existing config file /usr/local/mysql56/my.cnf on the system.
because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
the new default config file was created as /usr/local/mysql56/my-new.cnf,
please compare it with your file and take the changes you need.
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
10 copy start command
cp support-files/mysql.server /etc/init.d/mysqld56
chmod 700 /etc/init.d/mysqld56
echo "export path=$path:/usr/local/mysql56/bin">>/etc/profile
source /etc/profile
11 add command to system parameter
cd /data56
chkconfig --add mysqld56
12 start service & check & login
service mysqld56 start
[root@472322 data56]# service mysqld56 start
starting mysql. success!
[root@472322 data56]# mysql
welcome to the mysql monitor. commands end with ; or g.
your mysql connection id is 1
server version: 5.6.13 source distribution
copyright (c) 2000, 2013, 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.00 sec)
mysql>