mysql-advanced-5.6.25-linux-glibc2.5-i686.tar.gz安装

1.创建安装目录/u01
[root@mbsdb install]# mkdir /u01/
[root@mbsdb install]# ls -ltr
total 1598060
-rwxr--r--  1 root root 984729600 May  5 12:21 mysql-advanced-5.6.25-linux-glibc2.5-i686.tar
-rw-r--r--  1 root root     15602 May 28 19:30 README.txt
-rwxr--r--  1 root root 328125558 Jun 24 23:15 V76363-01.zip
-rwxr--r--  1 root root 321917929 Jun 25 04:39 V76362-01.zip
drwxr-xr-x 13 root root      4096 Aug 18 22:35 mysql-advanced-5.6.25-linux-glibc2.5-i686
[root@mbsdb install]# cd mysql-advanced-5.6.25-linux-glibc2.5-i686

2.修改目录权限为mysql:mysql
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# chown -R mysql:mysql .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# ls -ld .
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 .
[root@mbsdb mysql-advanced-5.6.25-linux-glibc2.5-i686]# cd ..

3.将源目录mv到/u01下并重命名为mysql
[root@mbsdb install]# mv mysql-advanced-5.6.25-linux-glibc2.5-i686 /u01/mysql

4.执行 mysql_install_db脚本,安装配置数据库
[root@mbsdb install]# cd /u01
[root@mbsdb u01]# ls -ltr
total 4
drwxr-xr-x 13 mysql mysql 4096 Aug 18 22:35 mysql
[root@mbsdb u01]# cd mysql/
[root@mbsdb mysql]# ls
bin   docs     INSTALL-BINARY  LICENSE.mysql  mysql-test  scripts  sql-bench
data  include  lib             man            README      share    support-files
[root@mbsdb mysql]# cd scripts/
[root@mbsdb scripts]# ls
mysql_install_db
[root@mbsdb scripts]# ./mysql_install_db --user=mysql --basedir=/u01/mysql --datadir=/u01/mysql/data
Installing MySQL system tables...2015-08-26 06:15:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:15:54 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2581 ...
2015-08-26 06:15:55 2581 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:15:55 2581 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:15:55 2581 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:15:55 2581 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:15:55 2581 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:15:55 2581 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:15:55 2581 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:15:55 2581 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:15:55 2581 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:15:55 2581 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-08-26 06:15:55 2581 [Note] InnoDB: Database physically writes the file full: wait...
2015-08-26 06:15:55 2581 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-08-26 06:15:57 2581 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-08-26 06:15:59 2581 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-08-26 06:15:59 2581 [Warning] InnoDB: New log files created, LSN=45781
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-08-26 06:15:59 2581 [Note] InnoDB: Doublewrite buffer created
2015-08-26 06:15:59 2581 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:15:59 2581 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Foreign key constraint system tables created
2015-08-26 06:15:59 2581 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-08-26 06:15:59 2581 [Note] InnoDB: Tablespace and datafile system tables created.
2015-08-26 06:15:59 2581 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:15:59 2581 [Note] InnoDB: 5.6.25 started; log sequence number 0
2015-08-26 06:15:59 2581 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:15:59 2581 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:00 2581 [Note] Binlog end
2015-08-26 06:16:00 2581 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:00 2581 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:02 2581 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK


Filling help tables...2015-08-26 06:16:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-08-26 06:16:02 0 [Note] /u01/mysql/bin/mysqld (mysqld 5.6.25-enterprise-commercial-advanced) starting as process 2604 ...
2015-08-26 06:16:02 2604 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-08-26 06:16:02 2604 [Note] InnoDB: The InnoDB memory heap is disabled
2015-08-26 06:16:02 2604 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2015-08-26 06:16:02 2604 [Note] InnoDB: Memory barrier is not used
2015-08-26 06:16:02 2604 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-08-26 06:16:02 2604 [Note] InnoDB: Using Linux native AIO
2015-08-26 06:16:02 2604 [Note] InnoDB: Not using CPU crc32 instructions
2015-08-26 06:16:02 2604 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-08-26 06:16:03 2604 [Note] InnoDB: Completed initialization of buffer pool
2015-08-26 06:16:03 2604 [Note] InnoDB: Highest supported file format is Barracuda.
2015-08-26 06:16:03 2604 [Note] InnoDB: 128 rollback segment(s) are active.
2015-08-26 06:16:03 2604 [Note] InnoDB: Waiting for purge to start
2015-08-26 06:16:03 2604 [Note] InnoDB: 5.6.25 started; log sequence number 1625977
2015-08-26 06:16:03 2604 [Note] RSA private key file not found: /u01/mysql/data//private_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:03 2604 [Note] RSA public key file not found: /u01/mysql/data//public_key.pem. Some authentication plugins will not work.
2015-08-26 06:16:04 2604 [Note] Binlog end
2015-08-26 06:16:04 2604 [Note] InnoDB: FTS optimize thread exiting.
2015-08-26 06:16:04 2604 [Note] InnoDB: Starting shutdown...
2015-08-26 06:16:05 2604 [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:

  /u01/mysql/bin/mysqladmin -u root password 'new-password'
  /u01/mysql/bin/mysqladmin -u root -h mbsdb password 'new-password'

Alternatively you can run:
  /u01/mysql/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 . ; /u01/mysql/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 at http://bugs.mysql.com/

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 /u01/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

5.将 mysql.server拷贝到/etc/rc.d/init.d下,并重命名为mysqld
[root@mbsdb scripts]# cd ../support-files/
[root@mbsdb support-files]# cp mysq l.server /etc/rc.d/init.d/mysqld

[root@mbsdb support-files]# /etc/init.d/mysqld start
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 276: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)[FAILED]
启动失败,修改mysqld脚本,设置basedir和datadir分别为/u01/mysql和/u01/mysql/data
basedir=/u01/mysql
datadir=/u01/mysql/data
重新启动mysql,启动成功
[root@mbsdb support-files]# /etc/init.d/mysqld start
Starting MySQL.......[  OK  ]

[root@mbsdb support-files]# mysql
-bash: mysql: command not found
修改.bash_profile中path,增加/u01/mysql/bin
PATH=$PATH:$HOME/bin:/u01/mysql/b in

[root@mbsdb ~]# s ource .bash_profile 
[root@mbsdb ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.25-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

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> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10972173/viewspace-1783409/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10972173/viewspace-1783409/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值