树莓派mariadb折腾
今天在树莓派之中安装mysql,结果被我安装了mariadb,这样做很讨厌,但是也可以将就用。记录一下折腾的过程。
安装就还是使用sudo apt install mysql
1.安装之后需要使用工具进行一些简单的配置
sudo mysql_secure_installation
下面是配置的一个记录,抄别人的
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none): <–使用刚才得到的root的密码 NljqL63OYlGo5cqy
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] y <– 是否更换root用户密码,输入y并回车,强烈建议更换
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y <– 是否删除匿名用户,生产环境建议删除,所以输入y并回车
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y <–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止
... Success! By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y <– 是否删除test数据库,输入y并回车
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y 是否重新加载权限表,输入y并回车
... Success! All done! If you've completed all of the above steps, your MySQL
installation should now be secure. Thanks for using MySQL! Cleaning up...
2.修改 /etc/mysql/mariadb.conf.d/50-server.cnf 文件
设置正确的时区
[mysqld]
default-time-zone = '+8:00'
设置可远程访问,设置之后3306端口就开放了
#bind-address = 127.0.0.1
之后在终端里输入
GRANT ALL PRIVILEGES ON *.* TO '需要开放的用户的用户名'@'需开放的地址' IDENTIFIED BY '用户密码' WITH GRANT OPTION;
flush privileges;
之后select表的时候就应该可以看到,多了一个用户,用此用户即可远程登录。当然,在此之前还是需要重启mysql服务器的。
sodo service mysql restart
备忘一下,mysql之中看所有数据库的命令是show databases,而不是show dbs,和mongodb不一样
树莓派mariadb折腾的更多相关文章
- 树莓派 Raspberry-Pi 折腾系列:系统安装及一些必要的配置
入手树莓派将近一个月了,很折腾,许多资源不好找,也很乱.简单整理一下自己用到的东西,方便以后自己或别人继续折腾. 0. 操作系统下载 树莓派官方 Raspbian 系统下载:http://www.ra ...
- 【树莓派】【转载】Raspberry Pi (树莓派)折腾记
在网上看到一篇对树莓派折腾记录比较详细的文章,时间比较早,但是有些东西没变. 对于新手而言,还是有点参考价值.文章参见:http://skypegnu1.blog.51cto.com/8991766/ ...
- 树莓派3b折腾指南
最近入手了树梅派3b,搭建了宿舍共享的热点和NAS,搭建透明代理科学上网的计划还没实现. 先报个价,一套折腾下来花了500大洋,树梅派3加外壳200,电源加内存卡100,显示器淘宝二手150,有线键鼠 ...
- 树莓派mariadb 设置密码
参考: sudo mysql -u root -p select Host,User,plugin from mysql.user where User='root'; plugin(加密方式)是un ...
- RPi 2B Raspbian system install
/***************************************************************************** * RPi 2B Raspbian系统安装 ...
- windows ssh RPi 2B
/************************************************************************* * windows ssh RPi 2B * 声明 ...
- 使用MMS(MongoDB Monitoring Service)监控MongoDB
使用MMS(MongoDB Monitoring Service)监控MongoDB 一.MongoDB简介: MongoDB是一个基于分布式文件存储的数据库.由C++语言编写.旨在为WEB应用提供可 ...
- 在树莓派上配置MariaDB
在树莓派上配置MariaDB 前言 MariaDB是由原本开发MySQL的一些原始开发者领导,他们担心Oracle收购MySQL后会有一些隐患.MariaDB与MySQL保持这高度兼容性,并使用了一个 ...
- 树莓派安装配置Nginx+PHP7+MariaDB
原文地址:http://blog.sina.com.cn/s/blog_150f554f50102yhra.html 一.安装 Nginx 和 PHP7 1.安装Nginx sudo apt inst ...
随机推荐
- 步步为营-77-Ajax简介
AJax:异步JavaScript和XML.Asynchronous JavaScript and XML 优点:无刷新 1 JavaScript下的Ajax 1.1 XMLHttpRequest对象 ...
- WPF多屏最大化
如果计算机存在多个显示器,这时设置wpf窗口为最大化,窗口只能在主显示器中实现最大化,如果想要实现窗口拉伸至多屏,需要获取所有显示器分辨率之和.这时用到了System.Windows.SystemPa ...
- 10本Java架构师必读书籍
1.大型网站系统与JAVA中间件实践 本书围绕大型网站和支撑大型网站架构的Java中间件的实践展开介绍. 从分布式系统的知识切入,让读者对分布式系统有基本的了解:然后介绍大型网站随着数据量.访问量增长 ...
- [转]EndNote导入IEEE文献的方法
EndNote导入IEEE文献的方法.IEEE虽然可以批量导出,但是批量导出的是CSV格式.如果想导入到EndNote,需要一个个文献的导入.本文介绍一下IEEE导出文献并导入到EndNote的方法. ...
- net core体系-web应用程序-4net core2.0大白话带你入门-8asp.net core 内置DI容器(DependencyInjection,控制翻转)的一点小理解
asp.net core 内置DI容器的一点小理解 DI容器本质上是一个工厂,负责提供向它请求的类型的实例. .net core内置了一个轻量级的DI容器,方便开发人员面向接口编程和依赖倒置(IO ...
- 高性能之html
下面是alloyteam的总结,还是那句老话站在巨人的肩膀上看的远. 避免使用Iframe Iframe也叫内联frame,可以把一个HTML文档嵌入到另一个文档中.使用iframe的好处是被嵌入的文 ...
- PHP的swoole框架/扩展socket聊天示例
PHP代码文件名 chat.php <?php //创建websocket服务器对象,监听0.0.0.0:9502端口 $ws = new swoole_websocket_server(&qu ...
- SQL注入——SQL Injection
本文部分内容转自:https://www.cnblogs.com/rush/archive/2011/12/31/2309203.html http://www.diybl.com/course/7_ ...
- sql 的一些总结
如果用到“每” 就要用到group by 例:每个部门有多少人,就要用到分组技术 聚合函数一般作用在多条记录上 having 是分组厚的筛选条件,分组厚的数据组内再筛选,where 则是在分组 ...
- Maya cmds pymel 获取安装选择顺序选择的物体
Maya cmds pymel 获取安装选择顺序选择的物体 import maya.cmds as cmds 先设置选择顺序 cmds.selectPref(trackSelectionOrder = ...