-
构建数据库系统
- 什么是数据库
- 部署mariadb数据库服务器
- 安装mariadb-server软件包
- 重启mariadb服务
- 访问mariadb
-
[root@localhost ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB ServerCopyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>
-
-
基本管理操作
- mariadb服务端配置调整
- 设置数据库管理员root密码
- 格式:mysqladmin [-u 用户名] [-p旧密码] password ‘新密码’
- [root@localhost ~]# mysqladmin -u root password ‘123’
[root@localhost ~]# mysql -u root -p123
- 禁止监听,只服务本机
修改/etc/my.cnf
- 设置数据库管理员root密码
- 用户信息存储在mysql-user表中
- 数据库的增删查
- 创建库
MariaDB [(none)]> create database nsd1905;
Query OK, 1 row affected (0.00 sec) - 删除库
MariaDB [(none)]> drop database nsd1905; - 进入库
- MariaDB [(none)]> use mysql;
- 创建库
- 数据库的多处/导入操作
- 用户授权设置
- mariadb服务端配置调整