树莓派安装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性能测试、调优策略

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

Linux下的实模式和保护模式

实模式:(即实地址访问模式)它是Intel公司80286及以后的x86(80386,80486和80586等)兼容处理器(CPU)的一种操作模式。实模式被特殊定义为20位地址内存可访问空间上,这就意味着它的容量是2的20次幂&#xff08…

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

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

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

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

关于解决Permission is only granted to system apps

一句话,clean一下这个Project!就OK了…… 不要被假象迷惑!转载于:https://www.cnblogs.com/wytings/p/4156038.html

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

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

java 删除目录下所有文件_Java删除文件、目录及目录下所有文件的方法实例

前言本文主要实现的功能是删除某个目录及目录下的所有子目录和文件,涉及到的知识点:File.delete()用于删除“某个文件或者空目录”!所以要删除某个目录及其中的所有文件和子目录,要进行递归删除。具体代码示例如下:imp…

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个网络号,即…

edittext实现自动查询,刷新listview

mEdittextqueryvalue.addTextChangedListener(new TextWatcher() {Overridepublic void onTextChanged(CharSequence s, int start, int before,int count) {/** 从本地数据库查询 */query s.toString(); //s是edittext编辑的内容isaddfalse;pageindex0;refreshView(type, que…

java rsaprivatekey_用ssh-keygen生成的公钥和私钥如何在java中转为RSAPublicKey和RSAPrivateKey...

公钥和私钥是用"ssh-keygen -t rsa"生成的,我把生成的公钥以字符串的形式传入下面的函数(从网上找的)就会报错。public static PublicKey string2PublicKey(String pubStr) throws Exception{ByteBuffer byteBuffer ByteBuffer.wrap(Base64.getDecoder().…

python字典中的值只能是字符串类型_python字典key不能是可以是啥类型

python中字典的key不能是可变类型。字典可存储任意类型对象,其中值可以取任何数据类型,但键必须是不可变的,如字符串、数字或元组。语法格式:【d {key1 : value1, key2 : value2}】。字典是另一种可变容器模型,且可存…

conda指定路径_导出不带前缀变量的conda环境,该变量显示executab的本地路径

为了在我的团队中提高可重复性,我在新创建的存储库中导出了一个conda环境文件,该存储库运行conda env export > environment.yml。在我的想法是让我的同事下载repo并运行conda env create -f environment.yml并准备好使用代码。在然而,我的…

未定义函数或变量_变量提升:JavaScript是顺序执行,为什么变量在定义之前执行不会报错而是报Underfined...

showName() console.log(myname) var myname hhh function showName() {console.log(函数showName被执行); }按照JavaScript 是按顺序执行的逻辑来理解的话,当执行到第 1 行的时候,由于函数 showName 还没有定义,所以执行应该会报错&#xf…

html背景图片大小控制

背景图尺寸(数值表示方式): #background-size{ background-size:200px 100px; } 背景图尺寸(百分比表示方式): #background-size{ background-size:30% 60%; } 背景图尺寸(等比扩展图片来填满元素,即cover值): #background-size{ …

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

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

python3 urllib3文档_python urllib3

{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":4,"count":4}]},"card":[{"des":"阿里技术人对外发布原创技术内容的最大平台&…

[翻译] RDVTabBarController

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

C# 通过ImportNode AppendChild方法合并XmlDocument,XML转为DataTable

C# 通过ImportNode AppendChild方法合并XmlDocument,XML转为DataTable var doc1 new XmlDocument(); var doc2 new XmlDocument();XmlNode root1 doc1.DocumentElement;doc2.Load(new XmlNodeReader(myXmlNode2));foreach (XmlNode node in doc2.DocumentElement…

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

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

java 字符串指定编码输出_java对字符的编码处理

在java应用软件中,会有多处涉及到字符集编码,有些地方需要进行正确的设置,有些地方需要进行一定程度的处理。1. getBytes(charset)这是java字符串处理的一个标准函数,其作用是将字符串所表示的字符按照charset编码,并以…