mysql 5.7 创建用户_MySQL 5.7 创建用户并授权
--创建用户
mysql> create user 'test'@'%' identified by 'System#2013';
Query OK, 0 rows affected (0.00 sec)
mysql> select host,user from mysql.user;
+-----------+-----------+
| host | user |
+-----------+-----------+
| % | test |
| localhost | jeffrey |
| localhost | mysql.sys |
| localhost | root |
+-----------+-----------+
4 rows in set (0.00 sec)
--授予对TEST数据库的操作权限
mysql> GRANT ALL ON test.* TO 'test'@'%';
Query OK, 0 rows affected (0.01 sec)
--测试新创建的用户
[root@T400-kelong ~]# mysql -utest -pSystem#2013
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.10-log MySQL Community Server (GPL)
Copyright (c) 2000, 2015, 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 test
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> CREATE TABLE client_firms (
-> id INT,
-> name VARCHAR(35)
-> )
-> PARTITION BY LIST (id) (
-> PARTITION r0 VALUES IN (1, 5, 9, 13, 17, 21),
-> PARTITION r1 VALUES IN (2, 6, 10, 14, 18, 22),
-> PARTITION r2 VALUES IN (3, 7, 11, 15, 19, 23),
-> PARTITION r3 VALUES IN (4, 8, 12, 16, 20, 24)
-> );
Query OK, 0 rows affected (0.15 sec)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-2063051/,如需转载,请注明出处,否则将追究法律责任。
mysql 5.7 创建用户_MySQL 5.7 创建用户并授权相关推荐
- mysql客户端如何创建用户_mysql的创创建用户阶段 开启客户端登录和授权阶段
创建一个权限有限的用户给别人使用 # 创建用户阶段 # mysql> create user [email protected]; # mysql> create user [email ...
- mysql删除用户账号和密码_mysql添加、删除用户和授权用户
MySql中添加用户,新建数据库,用户授权,删除用户,修改密码(注意每行后边都跟个;表示一个命令语句结束): 1.新建用户 1.1 登录MYSQL: @>mysql -u root -p @&g ...
- mysql添加新的实例_MySQL中添加新用户权限的实例详解
有2个不同的方法增加用户:通过使用GRANT语句或通过直接操作MySQL授权表.比较好的方法是使用GRANT语句,因为他们是更简明并且好像错误少些. 下面的例子显示出如何使用MySQL客户安装新用户. ...
- mysql从表截取信息_mysql中循环截取用户信息并插入到目标表对应的字段中
操作环境:有表game_list,字段:uid,score1,score2,seat_id,last_update: 传入参数为i_player_detail ,传入的值为多个用户的id.之前分数.之 ...
- mysql客户端如何建库_mysql建库建用户命令
1.登陆MySQL: mysql -u root -p password:输入密码 2.查看用户信息 select user,host,password from mysql.user; select ...
- mysql 远程超级用户_Mysql添加远程超级用户
一般安装了MySql之后都只有一个超级管理权限的用户root,而且root限制只能在数据库本机上使用. 我们可以通过下面2种方式添加一个具有超级管理权限而且能远程访问MySql数据库的超级用户 1. ...
- mysql数据库中如何创建角色_MySQL数据库如何创建用户呢?
摘要: 下文讲述MySQL数据库下创建用户的方法分享,如下所示: 在mysql的使用,查看上必不可少的就是MySQL的用户名,拥有一定权限的用户名可以对数据库指定相应的操作, MySQL数据库创建用户 ...
- mysql 刚安装完的用户_mysql 离线安装后用户初始化
systemctl ebable mysqld systemctl start mysqld 查看/var/log/mysqldlog,找到临时的密码 cat /var/log/mysqld.log ...
- mysql用命令行创建表_mysql命令行创建表
命令来查看表中的数据的变化: mysql>select*from students; 7.用文本方式将数据装入一个数据库表: 创建一个文本文件"student.sql",每行 ...
最新文章
- 《SAP ABAP 开发入门》课程正式发布
- mysql 运行 sql 脚本
- ROS系统 创建工作空间与功能包
- 真核转录组(denovo/resequencing)及案例分析
- spring—配置数据源
- 基于Flume的美团日志收集系统(一)架构和设计
- 《游戏行业DDoS攻击解决方案》重磅发布
- '' and 'and' difference in python
- 寻找相同的乱序字符串
- php重点,php – 课程。重点是什么?
- 2021:Python的下载安装教程(很详细,初学者也能懂)
- 错题集--大一C语言选择题
- 【转换输出流小练习 】现有一字符串:”我爱Java”。将该字符串保存到当前项目根目录下的a.txt文件中。​
- widows快捷键大全
- win7系统ftp服务器密码修改,win7 ftp服务器密码
- 什么是软件功能测试,如何做好功能测试?
- 河南工学院计算机宿舍,河南工学院宿舍条件,宿舍几人间环境好不好(图片)
- 大量C语言、C++、C#、VC编程相关书籍下载
- My深度学习的总结记录
- 如何解决 使用matplotlib.finance获取雅虎财经网站股票数据 报错?