centos7 mariadb设置初始密码
来源:互联网 发布:mac 怎么给文件归类 编辑:程序博客网 时间:2024/09/21 08:56
通过yum安装mariadb mariadb-server后设置一个初始密码。
首先启动mariadb服务,然后输入mysql进入mariadb控制台:
[root@localhost ~]# mysqlWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 2Server version: 5.5.52-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
输入 uuse mysql;
MariaDB [(none)]> use mysql;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changed
输入修改密码的命令:
update user set password=password("这里替换成你的密码")where user='root';
MariaDB [mysql]> update user set password=password("yoonching")where user='root';Query OK, 4 rows affected (0.00 sec)Rows matched: 4 Changed: 4 Warnings: 0
MariaDB [mysql]> flush privileges;Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> exitBye
[root@localhost ~]# mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
再测试:带登录信息
root@localhost ~]# mysql -uroot -pyoonchingWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 4Server version: 5.5.52-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
密码设置成功!
0 0
- centos7 mariadb设置初始密码
- centos7 mariadb 设置root密码
- centos7 安装和设置mariadb
- MariaDB系列—Linux下设置MariaDB的初始密码(未完成)
- centos7 安装 mariadb 及安装设置
- centos7启动和设置mysql/mariadb
- centos7启动和设置mysql/mariadb
- CentOS7 MariaDB
- CentOS7.0环境下,为MariaDB设置中文
- mysql 初始密码的设置
- mysql初始密码设置
- ubuntu 初始密码设置
- mysql 设置初始密码
- MYSQL5.7.17设置初始密码
- Linux root初始密码设置
- CentOS7安装mariadb
- CentOS7安装mariadb
- CentOS7 安装配置 MariaDB
- 机器学习实战(6):SVM-SMO-核函数 手写识别
- Android图片压缩加密上传
- shader uv动画
- Linux和Windows常用命令
- C++中的基本数据类型及派生类型
- centos7 mariadb设置初始密码
- CentOS7 + Phpstorm + Xdebug本地和远程调试配置教程大全
- 8.1 基于对象的程序设计
- Centos7 Apache-RocketMq4.+搭建及rocketmq demo
- python 简单错误总汇
- [web后端]用户注册安全性总结,salt加密
- php 编译安装拓展
- swift实现页面跳转(下一页以及返回)
- load-on-startup在配置文件web.xml中的含义