树莓派安装mysql5.6_Linux上安装MySQL5.6

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须要注冊一个账号。

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

a595ab428a5f86f2d56535b3dce51cc7.png

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

SouthEast

二, 在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';

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/575013.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java获取cpu使用率_2019年阿里P8架构师的解析:最新Java性能测试、调优策略

一、性能测试Ⅰ.测试方法微基准性能测试可以精准定位到某个模块或者某个方法的性能问题,例如对比一个方法使用同步实现和非同步实现的性能差异宏基准性能测试宏基准性能测试是一个综合测试,需要考虑到测试环境、测试场景和测试目标测试环境:模…

java在线编辑器_微软开源在线代码编辑器——Monaco Editor

介绍Monaco Editor是为VS Code提供支持的代码编辑器,运行在浏览器环境中。编辑器提供代码提示,智能建议等功能。供开发人员远程更方便的编写代码。移动浏览器或移动Web框架不支持Monaco编辑器。简单的理解就是VSCode中的代码编辑器和Monaco Editor使用的…

java的核心类库_Java核心类库,集合框架

Java集合框架的由来:Java最初版本只为最常用的数据结构提供了很少的一组类:比如Vector、Stack、Hashtable、BitSet、Enumerrationr接品,其中Enumerrationr接口提供了一种用于访问任意容器中各个元素的抽象机制。这是一种很明智的选择&#xf…

js splice方法_我用JS刷LeetCode | Day 8

如有兴趣,微信搜索「九零后重庆崽儿」,我们一起学前端。删除排序数组中的重复项:说明:现阶段的解题暂未考虑复杂度问题首发地址:我用JS刷LeetCode | Day 8​www.brandhuang.comQuestion:Given an array nums and a val…

js 根据掩码位计算可用ip地址_变长子网掩码:轻松分配IP地址(下)

Hello,World.如约而至土土来更文咯[吐舌]图1首先先揭晓一下上一篇文章的答案那就是192.168.1.0/24与192.168.2.0/24不能ping通192.168.1.0/16与192.168.2.0/16能ping通图2还记得土土的提示吗?网络号相同则能够ping通那么根据/24可以看出这两个IP地址有24个网络号,即…

java break递归_【Java】递归总结

摘要:大师 L. Peter Deutsch 说过:To Iterate is Human, to Recurse, Divine.中文译为:人理解迭代,神理解递归。毋庸置疑地,递归确实是一个奇妙的思维方式。对一些简单的递归问题,我们总是惊叹于递归描述问…

[翻译] RDVTabBarController

RDVTabBarController https://github.com/robbdimitrov/RDVTabBarController 效果: Supports iPad and iPhone 支持iPad与iPhoneSupports landscape and portrait orientations 支持横竖屏切换动画Can be used inside UINavigationController 可以用在UINavigationC…

内存位置访问无效 midas.dll_java并发之内存模型

作者:killianxu来源:https://www.cnblogs.com/killianxu/p/11665903.htmljava内存模型知识导图一 并发问题及含义并发编程存在原子性、可见性、有序性问题。原子性即一系列操作要么都执行,要么都不执行。 可见性,一个线程对共享变量的修改&am…

程序一旦发觉写得不理想,那就得重构它

早上有写一篇《设计模式--建造者(Builder)模式》http://www.cnblogs.com/insus/p/4179620.html。是在ASP.NET环境中,应用与演示设计模式(Builder)。现在Insus.NET从博文中最后的下载链接下载取源程序,它是有写得不够理想,现在重构它。问题点&…

template标签_C++核心准则T.65:使用标签分发提供函数的不同实现

T.65: Use tag dispatch to provide alternative implementations of a functionT.65:使用标签分发提供函数的不同实现Reason(原因)A template defines a general interface.模板定义普遍接口。Tag dispatch allows us to select implementations based on specific properties…

Windows服务器学习篇:服务器连接与退出

此文是我早期在公司内部发布的一篇给予新入职程序员基础技术培训的文章,非常基础简单,现拿出来给大家分享。当然,已工作人士可直接忽略... 一、Windows服务器连接 1. 在桌面菜单中的“运行”里,输入mstsc命令,然后回车…

nginx动静分离配置_Nginx动静分离

动静分离动静分离,就是将JSP、Servlet等动态资源交由Tomcat或其他Web服务器处理,将CSS、js、image等静态资源交由Nginx或其他Http服务器处理,充分发挥各自的优势,减轻其他服务器的压力,搭建更为高效的系统架构。Nginx动…

java thread 名称_Thread类常用方法之设置线程名称

package com.itheima.demo02.setName;/*设置线程的名称:(了解)1.使用Thread类中的方法setName(名字)void setName(String name) 改变线程名称,使之与参数 name 相同。2.创建一个带参数的构造方法,参数传递线程的名称;调用父类的带参构造方法,把线程名称传递给父类,让…

成员变量和局部变量的区别_Java 变量类型

点击上方“蓝字”带你去看小星星今天主要学习Java变量类型,主要是局部变量、实例变量和类变量(静态变量)。Java语言中,所有的变量在使用前必须声明。声明变量的基本格式如下:type identifier [ value][, identifier [ value] ...] ;格式说明…

【云图】如何制作附近实体店的地图?-微信微博支付宝

【云图】如何制作附近实体店的地图?-微信微博支付宝 原文:【云图】如何制作附近实体店的地图?-微信微博支付宝 摘要: 附近连锁店地图与全国连锁店地图,最大的区别就是: 1、附近连锁店地图需要先定位,然后搜…

php curl跨域cookie_PHP curl模拟文件上传(接口请求实现跨域文件中转)

3e2f08c0c11a8416dd107bbfc9159718.jpg客户端代码请求参数参数类型参数说明$urlstringpost提交的服务器url路径$data数组表单数据$files数组表单文件public function curl_custon_postfields($url, array $data array(), array $files array()){$curlfiles array();foreach …

oracle 分页_80分页查询,不止写法

据孔老先生说,茴香豆的茴字有四种写法,那oracle的分页查询又有多少种写法呢?分页查询,其实本质上就是topN查询的变种, 如果把topN的一部分结果集去掉,就变成了分页.topN的基本写法,两层select,第一层先order by,第二层再用rownum:select owner,object_name,object_id,rownum a…

GitHub上创建组织

4.3. 组织和团队 GitHub 在早期没有专门为组织提供账号,很多企业用户或大型开源组织只好使用普通用户账号作为组织的共享账号来使用。后来,GitHub推出了组织这一新的账号管理模式,满足大型开发团队的需要。 组织账号是不能用来登录的&#xf…

Hypothesis, 一个很少人会用的Python测试库

在软件开发中,测试是保证代码质量和功能正确性的重要环节。为了提高测试的覆盖率和效率,开发者们创造了许多测试框架和工具。其中 Hypothesis 是一个强大且受欢迎的 Python 测试库,它利用属性基测试的思想,可以自动生成测试数据并…

用户留存 数据统计 php,位运算实现用户留存率

统计留存率之前先弄清一下留存率的概念,百度百科中是这么说的: 用户在某段时间内开始使用应用,经过一段时间后,仍然继续使用应用的被认作是留存;这部分用户占当时新增用户的比例即是留存率,会按照每隔1单位…