OS & MySQL的版本号和配置:

MySQL Version: 5.6.19Linux Version: Linux boston.oracle.com 2.6.18-164.el5 #1 SMP Thu Sep 3 02:16:47 EDT 2009 i686 i686 i386 GNU/Linux

一。下载MySQL安装软件。请到www.oracle.com去找DATABASE DOWNLOAD。下载MySQL须要注冊一个账号。

我下载的版本号例如以下:

下载后解压就是下面的8个文件 :

二, 在Linux上安装MySQL(一个server程序和一个client程序)

[root@vmoel5u4 mysql_installer]# ll

total 115896

-rw-r--r-- 1 root root 22925106 May  8  2014 MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm

-rw-r--r-- 1 root root 95621549 May  8  2014 MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm

--安装Server端:

[root@vmoel5u4 mysql_installer]# rpm -ivh MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm

Preparing...                ########################################### [100%]

1:MySQL-server-advanced  ########################################### [100%]

2012-11-18 00:34:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2012-11-18 00:34:49 16251 [Note] InnoDB: Using mutexes to ref count buffer pool pages

2012-11-18 00:34:49 16251 [Note] InnoDB: The InnoDB memory heap is disabled

2012-11-18 00:34:49 16251 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation

2012-11-18 00:34:49 16251 [Note] InnoDB: Compressed tables use zlib 1.2.3

2012-11-18 00:34:49 16251 [Note] InnoDB: Using Linux native AIO

2012-11-18 00:34:49 16251 [Note] InnoDB: Not using CPU crc32 instructions

2012-11-18 00:34:49 16251 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2012-11-18 00:34:49 16251 [Note] InnoDB: Completed initialization of buffer pool

2012-11-18 00:34:49 16251 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2012-11-18 00:34:49 16251 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2012-11-18 00:34:49 16251 [Note] InnoDB: Database physically writes the file full: wait...

2012-11-18 00:34:49 16251 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2012-11-18 00:34:50 16251 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2012-11-18 00:34:50 16251 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2012-11-18 00:34:50 16251 [Warning] InnoDB: New log files created, LSN=45781

2012-11-18 00:34:50 16251 [Note] InnoDB: Doublewrite buffer not found: creating new

2012-11-18 00:34:50 16251 [Note] InnoDB: Doublewrite buffer created

2012-11-18 00:34:50 16251 [Note] InnoDB: 128 rollback segment(s) are active.

2012-11-18 00:34:50 16251 [Warning] InnoDB: Creating foreign key constraint system tables.

2012-11-18 00:34:50 16251 [Note] InnoDB: Foreign key constraint system tables created

2012-11-18 00:34:50 16251 [Note] InnoDB: Creating tablespace and datafile system tables.

2012-11-18 00:34:50 16251 [Note] InnoDB: Tablespace and datafile system tables created.

2012-11-18 00:34:50 16251 [Note] InnoDB: Waiting for purge to start

2012-11-18 00:34:50 16251 [Note] InnoDB: 5.6.19 started; log sequence number 0

2012-11-18 00:34:50 16251 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.

2012-11-18 00:34:50 16251 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.

A random root password has been set. You will find it in '/root/.mysql_secret'.

2012-11-18 00:34:51 16251 [Note] Binlog end

2012-11-18 00:34:51 16251 [Note] InnoDB: FTS optimize thread exiting.

2012-11-18 00:34:51 16251 [Note] InnoDB: Starting shutdown...

2012-11-18 00:34:53 16251 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2012-11-18 00:34:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2012-11-18 00:34:53 16282 [Note] InnoDB: Using mutexes to ref count buffer pool pages

2012-11-18 00:34:53 16282 [Note] InnoDB: The InnoDB memory heap is disabled

2012-11-18 00:34:53 16282 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation

2012-11-18 00:34:53 16282 [Note] InnoDB: Compressed tables use zlib 1.2.3

2012-11-18 00:34:53 16282 [Note] InnoDB: Using Linux native AIO

2012-11-18 00:34:53 16282 [Note] InnoDB: Not using CPU crc32 instructions

2012-11-18 00:34:53 16282 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2012-11-18 00:34:53 16282 [Note] InnoDB: Completed initialization of buffer pool

2012-11-18 00:34:53 16282 [Note] InnoDB: Highest supported file format is Barracuda.

2012-11-18 00:34:53 16282 [Note] InnoDB: 128 rollback segment(s) are active.

2012-11-18 00:34:53 16282 [Note] InnoDB: Waiting for purge to start

2012-11-18 00:34:53 16282 [Note] InnoDB: 5.6.19 started; log sequence number 1625977

2012-11-18 00:34:53 16282 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.

2012-11-18 00:34:53 16282 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.

2012-11-18 00:34:53 16282 [Note] Binlog end

2012-11-18 00:34:53 16282 [Note] InnoDB: FTS optimize thread exiting.

2012-11-18 00:34:53 16282 [Note] InnoDB: Starting shutdown...

2012-11-18 00:34:55 16282 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !

You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect,

no other statement but 'SET PASSWORD' will be accepted.

See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test database.

This is strongly recommended for production servers.

/*  上面的红色的大概意思例如以下:

为MySQL的数据库的root的用户生成了一个随机的秘密,请到/root/.mysql_secret里去找password。

当你第一次登陆时必须改动password,同一时候匿名帐号已经被删除掉了。

除此之外,你能够运行:

/usr/bin/mysql_secure_installation

他能够给你一些移除test 数据库的选项。

强烈推荐在生产server上做此操作。

*/

See the manual for more instructions.

Please report any problems athttp://bugs.mysql.com/

The latest information about MySQL is available on the web at

Support MySQL by buying support/licenses at

http://shop.mysql.com

New default config file was created as /usr/my.cnf and

will be used by default by the server when you start it.

You may edit this file to change server settings

--安装Client端:

[root@vmoel5u4 mysql_installer]# rpm -ivh MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm

Preparing...                ########################################### [100%]

1:MySQL-client-advanced  ########################################### [100%]

三,MySQL 数据库的配置

1。启动MySQL服务

[root@vmoel5u4 mysql_installer]# cd /etc/rc.d/init.d

[root@vmoel5u4 init.d]# service mysql start

Starting MySQL..........                                   [  OK  ]

2。改动MySQL数据库root用户的初始password,先查下初始password

[root@vmoel5u4 mysql_installer]# vi /root/.mysql_secret

# The random password set for the root user at Sun Nov 18 00:34:51 2012 (local time): kX65UtYvovXN9VOV

从上面能够初始password是:kX65UtYvovXN9VOV

[root@vmoel5u4 init.d]# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 15

Server version: 5.6.19-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, 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>

/*改动password为123456*/

mysql> update user set password=PASSWORD('123456') where user='root';

Query OK, 3 rows affected (0.00 sec)

Rows matched: 3  Changed: 3  Warnings: 0

/*刷新权限表*/

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

3。用新password123456登陆MySQL

[root@vmoel5u4 init.d]# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 16

Server version: 5.6.19-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, 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

mysql> select Host,User,Password from user;

+-----------+------+-------------------------------------------+

| Host      | User | Password                                  |

+-----------+------+-------------------------------------------+

| localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |

| 127.0.0.1 | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |

| ::1       | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |

+-----------+------+-------------------------------------------+

3 rows in set (0.00 sec)

4, 创建新的表test,并插入測试数据

mysql> create table test(id int);

Query OK, 0 rows affected (0.05 sec)

mysql> insert into test(id) values(1);

Query OK, 1 row affected (0.05 sec)

mysql> insert into test(id) values(2);

Query OK, 1 row affected (0.01 sec)

mysql> commit;

Query OK, 0 rows affected (0.00 sec)

mysql> select * from test;

+------+

| id   |

+------+

|    1 |

|    2 |

+------+

2 rows in set (0.02 sec)

四,MySQL通过RPM包安装后的路径布局

Directory                                                         Contents of Directory

/usr/bin                                                           Client programs and scripts

/usr/sbin                                                         The mysqld server

/var/lib/mysql                                                  Log files, databases

/usr/share/info                                                Manual in Info format

/usr/share/man                                              Unix manual pages

/usr/include/mysql                                         Include (header) files

/usr/lib/mysql                                                  Libraries

/usr/share/mysql                                           Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for  database installation

/usr/share/sql-bench                                   Benchmarks

From MySQL5.6 version, During RPM installation, a user named mysql and a group named mysql are created on the system. This is done using the useradd, groupadd, and usermod commands. Those commands require appropriate administrative privileges, which is required

for locally managed users and groups (as listed in the /etc/passwd and /etc/group files) by the RPM installation process being run by root.

安装5.6版本号的MySQL的时候,RPM安装包会自己主动的创建mysql 组合mysql用户。

创建mysql的CDDL数据库的新用户watson

use mysql

mysql>create user 'watson'@'172.30.41.93' identified by 'watson';

mysql>grant all on cddl.* to 'watson'@'172.30.41.93';

树莓派安装mysql5.6_Linux上安装MySQL5.6相关推荐

  1. mac安装mysql workbench_MAC上安装mysql及workbench

    下载mysql for mac    https://dev.mysql.com/downloads/installer/ 官网下载很慢---百度云:链接: https://pan.baidu.com ...

  2. unix 安装oracle,linux上安装Oracle

    当前位置:我的异常网» Linux/Unix » linux上安装Oracle linux上安装Oracle www.myexceptions.net  网友分享于:2013-09-03  浏览:26 ...

  3. iPhone 实用技巧 之 快速使用iTools安装ipa软件。本节简单介绍如何使用iTools安装在iPhone上安装ipa软件

    iPhone 实用技巧 之 快速使用iTools安装ipa软件.本节简单介绍如何使用iTools安装在iPhone上安装ipa软件,具体如下 目录 iPhone 实用技巧 之 快速使用iTools安装 ...

  4. centos 安装java web_Centos上安装java web的环境

    Centos上安装java web的环境 ,本次例子尽量不用yum形式安装(因为我不知道yum安装怎么指定目录,想把java,tomcat,mysql安装到指定的文件夹下,好管理). (java和to ...

  5. python详细安装教程linux-在Linux上安装Python3

    一.安装依赖环境 输入命令:yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readlin ...

  6. python安装教程windows-windows上安装Anaconda和python的教程详解

    一提到数字图像处理编程,可能大多数人就会想到matlab,但matlab也有自身的缺点: 1.不开源,价格贵 2.软件容量大.一般3G以上,高版本甚至达5G以上. 3.只能做研究,不易转化成软件. 因 ...

  7. 如何在电脑上安装python-在电脑上安装python的方法

    Python的用途十分广泛,几乎可以在任何平台下运行,例如我们所熟悉的:Windows/Unix/Linux/Macintosh都可以安装.在本篇文章中说的是在Windows操作系统中安装python ...

  8. python3安装步骤mac-Mac 上安装python3——手把手教程

    mac上自带了python2.7 但是由于工作需要需要安装python3.如何安装python3,接下来手把手教你! 有2种方法:推荐使用homebrew安装. 方法一: 步骤一:Mac 上有个很牛的 ...

  9. python安装教程mac-Mac 上安装python3——手把手教程

    mac上自带了python2.7 但是由于工作需要需要安装python3.如何安装python3,接下来手把手教你! 有2种方法:推荐使用homebrew安装. 方法一: 步骤一:Mac 上有个很牛的 ...

最新文章

  1. encache学习教程
  2. Python 技巧篇-字符串灵活处理:字符串过滤、字符串拼接,字符串切片,特殊、超长字符串的处理实例演示
  3. python partition函数_在Python中相当于R的createDataPartition
  4. Linux创始人:v5.8是有史以来最大的发行版之一
  5. 《大数据》2021年第6期目次摘要
  6. 【英语学习】【Daily English】U14 Transportation L03 Sorry for keeping you waiting
  7. TcpClient Class
  8. 沈师 Java程序设计 PTA 填空题、程序填空题答案
  9. 第八章第六题(代数:两个矩阵相乘的方法)(Algebra: a method of multiplying two matrices)
  10. Visio中的内容另存为图片且不改变画质
  11. 入职字节外包一个月,我离职了
  12. 一名程序员心态的重要性
  13. java端实现对数据库的增加
  14. 基本面指标怎样选股?基本面选股方法
  15. C++开源游戏推荐,植物大战僵尸(Cocos2dx开源项目)
  16. 一文搞懂FIFO深度计算
  17. 小爱音箱怎么装app_小爱音箱app下载-小爱音箱手机版 v2.2.2 - 安下载
  18. docker修改端口映射,技术总监都拍手叫好
  19. mac termial 用户名@主机名变了
  20. Win10 开机出现位置不可用C:\users\zhaojian\Downlods 点关闭对话框桌面图标文件夹不见,通过更改注册表只有部分文件找回,其他文件丢失(未解决)

热门文章

  1. Java 字符串性能对比
  2. Java中锁的使用和实现
  3. 安卓 linux找回内置存储,Android手机自带内部存储路径的获取
  4. java幻灯片播放代码_简单常用的幻灯片播放实现代码
  5. java md2_GitHub - edzjx/Md2Crypto
  6. div html 下边加横线_HTML的组成部分、DIV+CSS布局
  7. python偏函数和高阶函数_【Python入门】8.高阶函数之 匿名函数和偏函数
  8. 在Linux系统下实现进程,Linux进程学习(一)之Linux进程的基本知识和实现
  9. 抓包工具mitmproxy环境配置使用(一)
  10. 紫书 团队队列(队列)