MariaDB管理系统
MariaDB管理系统
[root@c4kaichen@163 ~]# yum install mariadb
[root@c4kaichen@163 ~]# yum install -y mariadb-server.x86_64
开启:
[root@c4kaichen@163 ~]# systemctl start mariadb --有报错的话删除 /var/lib/mysql 和 /etc/my.cnf 重新安装就没有错了
设置开机自动启动该服务:
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
初始化设置:
[root@c4kaichen@163 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, 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):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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
... 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
... Success!
By default, MariaDB 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] n
... skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
防火墙对数据库进行允许策略
[root@c4kaichen@163 ~]# firewall-cmd --permanent --add-service=mysql
success
[root@c4kaichen@163 ~]# firewall-cmd --reload
success
登录数据库:
[root@c4kaichen@163 ~]# mysql -u root -p
Enter password:
查看已有数据库:
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
备份数据:
mysqldump -u root -p cisco >/tmp/package2/ciscobackup.dump
恢复数据:
[root@c4kaichen@163 ~]# mysql -u root -p cisco </tmp/package2/ciscobackup.dump
解决远程主机不能连接的问题:
[root@localhost ~]# mysql -u root -p
MariaDB [mysql]> select * from user;
insert into user (host,user,password) values ('172.30.2.13','root','*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B')
> flush privileges;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT O
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '1*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'172.30.2.13 BY 'root' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.%' IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
---------------------------------------------------------------------------------------------------------
报错处理:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
MariaDB管理系统的更多相关文章
- 第18章 使用MariaDB数据库管理系统
章节概述: MYSQL数据库管理系统被Oracle公司收购后从开源换向到了封闭,导致包括红帽在内的许多Linux发行版选择了MariaDB. 本章节将教会您使用mariaDB数据库管理工具来管理数据库 ...
- MariaDb数据库管理系统的学习(一)安装示意图
MariaDB数据库管理系统是MySQL的一个分支.主要由开源社区在维护,採用GPL授权许可.开发这个分支的原因之中的一个是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区採用分 ...
- 关于数据库管理系统DBMS--关系型数据库(MySQL/MariaDB)
数据库的结构(3种):层次,网状,关系型(用的最多): DBMS的三层模型: 视图层:面向最终用户: 逻辑层:面向程序员或DBA: 物理层:面向系统管理员: 关系型数据库管理系统——RDBMS: 主要 ...
- MariaDB数据库管理系统
MYSQL数据库管理系统被Oracle公司收购后从开源换向到了封闭,导致许多Linux发行版选择了MariaDB. MYSQL是一款大家都非常熟知的数据库管理系统,技术成熟.配置简单.开源免费并且 ...
- Linux基础学习-MariaDB数据库管理系统
数据库管理系统 数据库是指按照某些特定结构来存储数据资料的数据仓库,数据库管理系统是一种能够对数据库中存放的数据进行建立.修改.删除.查找.维护等操作的软件程序. 初始化MariaDB服务 [root ...
- 《Linux就该这么学》培训笔记_ch18_使用MariaDB数据库管理系统
<Linux就该这么学>培训笔记_ch18_使用MariaDB数据库管理系统 文章最后会post上书本的笔记照片. 文章主要内容: 初始化MariaDB服务 管理用户以及授权 创建数据库与 ...
- MariaDb数据库管理系统学习(二)使用HeidiSQL数据库图形化界面管理工具
HeidiSQL 是一款用于简单化的 MySQL server和数据库管理的图形化界面.该软件同意你浏览你的数据库,管理表,浏览和编辑记录,管理用户权限等等.此外,你能够从文本文件导入数据,执行 SQ ...
- mariadb
MariaDB数据库管理系统是MySQL的一个分支
- 15 个有用的 MySQL/MariaDB 性能调整和优化技巧(转载的一篇好文)
MySQL 是一个强大的开源关系数据库管理系统(简称 RDBMS).它发布于 1995 年(20年前).它采用结构化查询语言(SQL),这可能是数据库内容管理中最流行的选择.最新的 MySQL 版本是 ...
随机推荐
- 深入理解Linux网络技术内幕——Notification内核通知表链
为什么要有内核通知表链: Linux由多个相互依赖的子系统组成.其中一些子系统可能需要对其他子系统的一些事件感兴趣.这样子系统之间需要一些通信机制来实现这一功能. 在接触Notific ...
- Andriod Studio 解决问题 Failed to resolve: com.android.support:appcompat-v7:28.+
Andriod Studio报错提示: Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:28.+ 原因:Andri ...
- [转]数据库更新(Update语句)查询
2011-03-27 10:40:11| 分类: Database |举报|字号 订阅原文出自:http://blog.csdn.net/ylnjust02/archive/2005/12/10/54 ...
- VC++ 6.0 C8051F340 USB 通信 CAN 数据解析
// HelloWorld.cpp : Defines the entry point for the console application. // /*********************** ...
- 值得收藏的批处理程序 - imsoft.cnblogs
文件强力删除.bat @echo off @echo 文件马上被强制删除 @echo 确定吗? pause DEL /F /A /Q \\?\%1 RD /S /Q \\?\%1 虚拟Wi-Fi.ba ...
- NSObject之二
前面一章我们整理了NSObject类,这一章我们来看看NSObject协议的内容. NSObject协议提供了一组方法作为Objective-C对象的基础.其实我们对照一个NSObject类和NSOb ...
- android 自动拨打电话 挂断电话代码
页面布局文件代码 ( res下面的layout下面的activity_main.xml代码 ) <RelativeLayout xmlns:android="http://sche ...
- 树的遍历算法-只有一个变量T-递归和非递归
void PostOrderTraverse(BTNode *T) { //就用到了一个变量T if(T==NULL) return; PostOrderTraverse(T->lchild); ...
- List和json数组的转换(赋源代码)
public class a11111111 { //参数obj可以是 json对象,字符串, list public static void fun(Object obj){ JSONArray d ...
- u-boot分析
4.Bootloader:u-boot.2009.08分析与移植4.1:分析u-boot根文件夹下的Makefile,能够看到uboot编译的顺序例如以下,由此可知编译运行的第一个文件是cpu/$(C ...