mysql 5.6.33下载_CentOS 6.8下安装MySQL 5.6.33

此处操作,包含MySQL的客户端及服务端。

MySQL下载地址: http://dev.mysql.com/downloads/mysql/5.6.html

1 MySQL-5.6.33-1.linux_glibc2.5.x86_64.rpm-bundle.tar

下载到本地,将其解压,得到如下文件:

1 -rw-r--r--. 1 7155 31415 23514633 Aug 29 18:11 MySQL-client-5.6.33-1.linux_glibc2.5.x86_64.rpm2 -rw-r--r--. 1 7155 31415 4593511 Aug 29 18:11 MySQL-devel-5.6.33-1.linux_glibc2.5.x86_64.rpm3 -rw-r--r--. 1 7155 31415 117878328 Aug 29 18:11 MySQL-embedded-5.6.33-1.linux_glibc2.5.x86_64.rpm4 -rw-r--r--. 1 7155 31415 89757099 Aug 29 18:12 MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm5 -rw-r--r--. 1 7155 31415 2424746 Aug 29 18:12 MySQL-shared-5.6.33-1.linux_glibc2.5.x86_64.rpm6 -rw-r--r--. 1 7155 31415 5181146 Aug 29 18:12 MySQL-shared-compat-5.6.33-1.linux_glibc2.5.x86_64.rpm7 -rw-r--r--. 1 7155 31415 75564628 Aug 29 18:13 MySQL-test-5.6.33-1.linux_glibc2.5.x86_64.rpm

其中,用到的部分,只有client以及server两个文件。

在安装之前,最好要执行一下检测当前系统是否安装有其他版本的MySQL,否则安装过程中会出现安装包中的插件和已经安装的插件有冲突,something confilcts with exiting 巴拉巴拉。。。。。

1 rpm -qa | grep -i mysql

rpm安装程序很简单,就不多说.

安装后的程序,客户端mysql在/usr/bin下面,服务端在/usr/sbin/下面。mysql的安装脚本会被copy到/etc/init.d/目录下。最简单的事情,什么都不修改,用默认的配置,则mysql的配置项目datadir是在

此处操作,包含MySQL的客户端及服务端。

MySQL下载地址: http://dev.mysql.com/downloads/mysql/5.6.html

1 MySQL-5.6.33-1.linux_glibc2.5.x86_64.rpm-bundle.tar

下载到本地,将其解压,得到如下文件:

1 -rw-r--r--. 1 7155 31415 23514633 Aug 29 18:11 MySQL-client-5.6.33-1.linux_glibc2.5.x86_64.rpm

2 -rw-r--r--. 1 7155 31415 4593511 Aug 29 18:11 MySQL-devel-5.6.33-1.linux_glibc2.5.x86_64.rpm

3 -rw-r--r--. 1 7155 31415 117878328 Aug 29 18:11 MySQL-embedded-5.6.33-1.linux_glibc2.5.x86_64.rpm

4 -rw-r--r--. 1 7155 31415 89757099 Aug 29 18:12 MySQL-server-5.6.33-1.linux_glibc2.5.x86_64.rpm

5 -rw-r--r--. 1 7155 31415 2424746 Aug 29 18:12 MySQL-shared-5.6.33-1.linux_glibc2.5.x86_64.rpm

6 -rw-r--r--. 1 7155 31415 5181146 Aug 29 18:12 MySQL-shared-compat-5.6.33-1.linux_glibc2.5.x86_64.rpm

7 -rw-r--r--. 1 7155 31415 75564628 Aug 29 18:13 MySQL-test-5.6.33-1.linux_glibc2.5.x86_64.rpm

其中,用到的部分,只有client以及server两个文件。

在安装之前,最好要执行一下检测当前系统是否安装有其他版本的MySQL,否则安装过程中会出现安装包中的插件和已经安装的插件有冲突,something confilcts with exiting 巴拉巴拉。。。。。

1 rpm -qa | grep -i mysql

rpm安装程序很简单,就不多说.

安装后的程序,客户端mysql在/usr/bin下面,服务端在/usr/sbin/下面。mysql的安装脚本会被copy到/etc/init.d/目录下。最简单的事情,什么都不修改,用默认的配置,则mysql的配置项目basedir是在/var/lib/mysql下面。

现在,需要注意了,MySQL的datadir需要设置mysql的用户owner以及group。

1 chown -R mysql:mysql /var/lib/mysql                #这一步是绝对的重点,不要忘记,若启动mysql daemon出错,需要检查下权限问题。

否则,启动mysqld是会失败的。。。。

1 [root@CloudGame bin]# service mysql start2 Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/CloudGame.pid).

调查问题啊,由于mysql的默认配置情况下,错误日志是在basedir下面,文件名为$HOSTNAME.err,查看文件,既可以看到错误的详情内容。

1 [root@CloudGame mysql]# ll2 total 110632

3 -rw-rw----. 1 mysql mysql 56 Sep 23 16:51auto.cnf4 -rw-r-----. 1 mysql mysql 17672 Sep 23 17:29CloudGame.err5 -rw-r-----. 1 mysql mysql 3275 Sep 23 16:52 CloudGame.err-bk6 -rw-rw----. 1 mysql mysql 12582912 Sep 23 17:07ibdata17 -rw-rw----. 1 mysql mysql 50331648 Sep 23 17:29ib_logfile08 -rw-rw----. 1 mysql mysql 50331648 Sep 23 16:51ib_logfile19 drwx------. 2 mysql mysql 4096 Sep 23 16:55mysql10 drwx------. 2 mysql mysql 4096 Sep 23 16:55performance_schema11 drwx------. 2 mysql mysql 4096 Sep 23 16:55test12 [root@CloudGame mysql]# pwd13 /var/lib/mysql

初始安装的数据库是没有root密码的,即root用户不需要密码即可登录。当MySQL daemon启动的情况下,可以执行mysql_secure_installnation可以设置一下数据库的基本信息。

1 [root@CloudGame bin]# mysql_secure_installation2

3

4

5 NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL6 SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

7

8 In order to log into MySQL to secure it, we'll need the current

9 password for the root user. If you've just installed MySQL, and

10 you haven't set the root password yet, the password will be blank,

11 so you should just press enter here.12

13 Enter current password for root (enter fornone):14 OK, successfully used password, moving on...15

16 Setting the root password ensures that nobody can log into the MySQL17 root user without the proper authorisation.18

19 Set root password? [Y/n] y20 New password:21 Re-enter newpassword:22 Password updated successfully!

23 Reloading privilege tables..24 ... Success!

25

26

27 By default, a MySQL installation has an anonymous user, allowing anyone28 to log into MySQL without having to have a user account created for

29 them. This is intended only fortesting, and to make the installation30 go a bit smoother. You should remove them before moving into a31 production environment.32

33 Remove anonymous users? [Y/n] y34 ... Success!

35

36 Normally, root should only be allowed to connect from 'localhost'. This37 ensures that someone cannot guess at the root password fromthe network.38

39 Disallow root login remotely? [Y/n] n40 ... skipping.41

42 By default, MySQL comes with a database named 'test'that anyone can43 access. This is also intended only fortesting, and should be removed44 before moving into a production environment.45

46 Remove test database and access to it? [Y/n] n47 ... skipping.48

49 Reloading the privilege tables will ensure that all changes made so far50 will take effect immediately.51

52 Reload privilege tables now? [Y/n] n53 ... skipping.54

55

56

57

58 All done! If you've completed all of the above steps, your MySQL

59 installation should now be secure.60

61 Thanks for using MySQL!

62

63

64 Cleaning up...65 [root@CloudGame bin]#

OK,到此,MYSQL 5.6.33的安装结束。 即可正常使用了!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值