linux安装mysql 5.6实时教程和配置

今天数据库服务器可以使用了,现在下一步就是安装mysql,,决定mysql 版本为5.6.14

检查系统中是否已经安装过mysql。rpm -qa | grep mysql如下图:

如果存在,则需要删除。yum -y remove mysql*继续检查一下是否还存在mysqlrpm -qa | grep -i mysql

然后下一步就是下载rpm包了。需要下载:MySQL-client-5.6.15-1.el6.x86_64.rpmMySQL-devel-5.6.15-1.el6.x86_64.rpmMySQL-server-5.6.15-1.el6.x86_64.rpm逐一执行命令:wget wget wget

接下来就是安装了分别依次执行:[root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-server-5.6.15-1.el6.x86_64.rpmPreparing… ########################################### [100%] 1:MySQL-server ########################################### [100%]2015-03-06 08:16:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).2015-03-06 08:16:03 28629 [Note] InnoDB: The InnoDB memory heap is disabled2015-03-06 08:16:03 28629 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2015-03-06 08:16:03 28629 [Note] InnoDB: Compressed tables use zlib 1.2.32015-03-06 08:16:03 28629 [Note] InnoDB: Using Linux native AIO2015-03-06 08:16:03 28629 [Note] InnoDB: Using CPU crc32 instructions2015-03-06 08:16:03 28629 [Note] InnoDB: Initializing buffer pool, size = 128.0M2015-03-06 08:16:03 28629 [Note] InnoDB: Completed initialization of buffer pool2015-03-06 08:16:03 28629 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2015-03-06 08:16:03 28629 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB2015-03-06 08:16:03 28629 [Note] InnoDB: Database physically writes the file full: wait…2015-03-06 08:16:03 28629 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB2015-03-06 08:16:04 28629 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB2015-03-06 08:16:06 28629 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile02015-03-06 08:16:06 28629 [Warning] InnoDB: New log files created, LSN=457812015-03-06 08:16:06 28629 [Note] InnoDB: Doublewrite buffer not found: creating new2015-03-06 08:16:06 28629 [Note] InnoDB: Doublewrite buffer created2015-03-06 08:16:06 28629 [Note] InnoDB: 128 rollback segment(s) are active.2015-03-06 08:16:06 28629 [Warning] InnoDB: Creating foreign key constraint system tables.2015-03-06 08:16:06 28629 [Note] InnoDB: Foreign key constraint system tables created2015-03-06 08:16:06 28629 [Note] InnoDB: Creating tablespace and datafile system tables.2015-03-06 08:16:06 28629 [Note] InnoDB: Tablespace and datafile system tables created.2015-03-06 08:16:06 28629 [Note] InnoDB: Waiting for purge to start2015-03-06 08:16:06 28629 [Note] InnoDB: 5.6.15 started; log sequence number 0A random root password has been set. You will find it in ‘/root/.mysql_secret’.2015-03-06 08:16:07 28629 [Note] Binlog end2015-03-06 08:16:07 28629 [Note] InnoDB: FTS optimize thread exiting.2015-03-06 08:16:07 28629 [Note] InnoDB: Starting shutdown…2015-03-06 08:16:08 28629 [Note] InnoDB: Shutdown completed; log sequence number 16259772015-03-06 08:16:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).2015-03-06 08:16:08 28652 [Note] InnoDB: The InnoDB memory heap is disabled2015-03-06 08:16:08 28652 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2015-03-06 08:16:08 28652 [Note] InnoDB: Compressed tables use zlib 1.2.32015-03-06 08:16:08 28652 [Note] InnoDB: Using Linux native AIO2015-03-06 08:16:08 28652 [Note] InnoDB: Using CPU crc32 instructions2015-03-06 08:16:08 28652 [Note] InnoDB: Initializing buffer pool, size = 128.0M2015-03-06 08:16:08 28652 [Note] InnoDB: Completed initialization of buffer pool2015-03-06 08:16:08 28652 [Note] InnoDB: Highest supported file format is Barracuda.2015-03-06 08:16:08 28652 [Note] InnoDB: 128 rollback segment(s) are active.2015-03-06 08:16:08 28652 [Note] InnoDB: Waiting for purge to start2015-03-06 08:16:08 28652 [Note] InnoDB: 5.6.15 started; log sequence number 16259772015-03-06 08:16:08 28652 [Note] Binlog end2015-03-06 08:16:08 28652 [Note] InnoDB: FTS optimize thread exiting.2015-03-06 08:16:08 28652 [Note] InnoDB: Starting shutdown…2015-03-06 08:16:10 28652 [Note] InnoDB: Shutdown completed; log sequence number 1625987[root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-devel-5.6.15-1.el6.x86_64.rpmPreparing… ########################################### [100%] 1:MySQL-devel ########################################### [100%][root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-client-5.6.15-1.el6.x86_64.rpmPreparing… ########################################### [100%] 1:MySQL-client ########################################### [100%]修改配置文件位置。[root@iZ25in7iu0fZ rpm]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf初始化MySQL及设置密码cp /usr/share/mysql/my-default.cnf /etc/my.cnf/usr/bin/mysql_install_dbcat /root/.mysql_secret记录最后的密码mysql -p —输入记录的密码,即可登录mysql。set password for’root’@’localhost’=password(‘新密码’);flush privileges;exit设置自启动chkconfig mysql onMySQL的默认安装位置

1/var/lib/mysql/#数据库目录

2/usr/share/mysql#配置文件目录

3/usr/bin#相关命令目录

并且为之实践了关怀和付出的善举。对于我性情中的易感和怨薄,

linux安装mysql 5.6实时教程和配置

相关文章:

你感兴趣的文章:

标签云: