mysql5.6版本的安装配置过程

从今年3月份开始mysql官网开始发布相关的5.6系列的各个版本,对于mysql5.6系列的版本对一起的版本进行了全局性的细节性加强;个人感觉,以下是在虚拟机中配置的mysql5.6.10源码安装的过程分享记录下:

[root@mysql5 ~]# groupadd mysql
[root@mysql5 ~]# useradd -r -g mysql mysql
[root@mysql5 ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  mysql-5.6.10.tar.gz
[root@mysql5 ~]# cd /usr/local/
[root@mysql5 local]# ls
bin  etc  games  include  lib  libexec  sbin  share  src
[root@mysql5 local]# cp /root/mysql-5.6.10.tar.gz  /usr/local/
[root@mysql5 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
[root@mysql5 local]#  tar -zxvf mysql-5.6.10.tar.gz
[root@mysql5 local]# cd mysql-5.6.10 
cmake . 
make && make install 

[root@mysql5 mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql
[root@mysql5 mysql-5.6.10]#
[root@mysql5 mysql-5.6.10]# cd /usr/local/mysql/scripts/
[root@mysql5 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

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

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/mysql/bin/mysqladmin -u root password 'new-password'
  /usr/local/mysql/bin/mysqladmin -u root -h mysql5.6 password 'new-password'

Alternatively you can run:

  /usr/local/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 . ; /usr/local/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 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/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

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

[root@mysql5 scripts]#  
[root@mysql5 scripts]# cd /usr/local/mysql/support-files/
[root@mysql5 support-files]# cp mysql.server  /etc/rc.d/init.d/mysql
[root@mysql5 support-files]# cp my-default.cnf  /etc/my.cnf 
cp: overwrite `/etc/my.cnf'? y
[root@mysql5 support-files]# 
[root@mysql5 support-files]# chkconfig -add mysql
-add: unknown option
[root@mysql5 support-files]# chkconfig --add mysql
[root@mysql5 support-files]# chkconfig mysql on
[root@mysql5 support-files]# service mysql start
Starting MySQL.                                            [  OK  ]
[root@mysql5 support-files]# 
[root@mysql5 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

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

mysql>
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:           mysql@localhost
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 tables: 60  Queries per second avg: 0.022
--------------

mysql> 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MySQL 5.6的下载、安装配置可以按照以下步骤进行: 1. 首先,你可以从MySQL官方网站下载MySQL 5.6安装文件。下载地址是https://dev.mysql.com/downloads/mysql/。请注意,基于Windows平台的MySQL安装文件有两个版本可供选择,一种是以.msi为后缀的二进制安装版本,另一种是以.zip为后缀的压缩版本。你可以根据自己的需求选择其中之一。 2. 下载完成后,双击安装文件开始安装MySQL。按照安装向导的指示进行操作,选择安装路径和其他选项。在安装过程中,你可以选择自定义安装路径,比如将MySQL安装在C:\Program Files\MySQL\MySQL Server 5.6目录下。[1] 3. 安装完成后,你需要修改MySQL配置文件。MySQL 5.6默认的配置文件是在D:\Program Files\MySQL\MySQL Server 5.6\my-default.ini。你可以在该目录下创建一个名为my.ini的文件,并在其中进行配置修改。[2] 4. 打开my.ini文件,你可以根据自己的需求修改其中的配置项。比如,你可以修改basedir和datadir参数来指定MySQL安装目录和数据目录。通常情况下,你可以将basedir设置为C:\Program Files\MySQL\MySQL Server 5.6,将datadir设置为C:\Program Files\MySQL\MySQL Server 5.6\data。这样,MySQL安装目录和数据目录就分别指定为这两个路径。[1] 5. 修改完配置文件后,保存并关闭my.ini文件。 6. 现在,你可以启动MySQL服务了。你可以通过在命令行中输入以下命令来启动MySQL服务:net start mysql。如果一切顺利,你应该能够看到MySQL服务成功启动的提示。 至此,你已经完成了MySQL 5.6的下载、安装配置过程。你可以通过命令行或者MySQL客户端来连接和管理MySQL数据库了。希望这个教程对你有帮助!

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值