create创建的用户,只有usage权限,即,连接数据库的权限,最低的权限。

# 1、新建用户,这里的用户是由user_name 和ip一起唯一确定一个用户。
# 2、若省略ip表达式,则表示%,即所有主机。
# 3、不能创建重复的用户, # 创建用户
create user 用户名@'主机或ip表达式' identified by '密码';
create user username identified by '123456';
create user username@'localhost' identified by '123456';
create user username@'igoodful.com' identified by '123456';
create user username@'%.com' identified by '123456';
create user username@'127.0.0.1' identified by '123456';
create user username@'10.10.%' identified by '123456';
#########################################################
# 删除用户
drop user username@'localhost';
drop user username@'127.0.0.1';
drop user username@'10.10.%';

#########################################################
# 修改用户
rename user username_old@'10.%' to username_new@'10.10.10.10';

create user的更多相关文章

  1. 记一次tomcat线程创建异常调优:unable to create new native thread

    测试在进行一次性能测试的时候发现并发300个请求时出现了下面的异常: HTTP Status 500 - Handler processing failed; nested exception is ...

  2. Could not create SSL connection through proxy serve-svn

    RA layer request failedsvn: Unable to connect to a repository at URL xxxxxx 最后:Could not create SSL ...

  3. android 使用Tabhost 发生could not create tab content because could not find view with id 错误

    使用Tabhost的时候经常报:could not create tab content because could not find view with id 错误. 总结一下发生错误的原因,一般的 ...

  4. Create a Team in RHEL7

    SOLUTION VERIFIED September 13 2016 KB2620131 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  5. Create a bridge using a tagged vlan (8021.q) interface

    SOLUTION VERIFIED April 27 2013 KB26727 Environment Red Hat Enterprise Linux 5 Red Hat Enterprise Li ...

  6. [转]nopCommerce Widgets and How to Create One

    本文转自:https://dzone.com/articles/what-are-nopcommerce-widgets-and-how-to-create-one A widget is a sta ...

  7. Git异常:fatal: could not create work tree dir 'XXX': No such file or directory

    GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ———————————————————————————————————————— ...

  8. SQL Server 在多个数据库中创建同一个存储过程(Create Same Stored Procedure in All Databases)

    一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 遇到的问题(Problems) 实现代码(SQL Codes) 方法一:拼接SQL: 方法二: ...

  9. SharePoint 2013 create workflow by SharePoint Designer 2013

    这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...

  10. Create an offline installation of Visual Studio 2017 RC

    Create an offline installation of Visual Studio 2017 RC ‎2016‎年‎12‎月‎7‎日                             ...

随机推荐

  1. spark 应用场景1-求年龄平均值

    原文引自:http://blog.csdn.net/fengzhimohan/article/details/78535143 该案例中,我们将假设我们需要统计一个 10 万人口的所有人的平均年龄,当 ...

  2. HttpClientUitl工具类

    public class HttpClient { private CloseableHttpClient httpClient; public HttpClient() { this.httpCli ...

  3. mysql模糊查询特殊字符(\,%和_)处理

    /** * sql模糊查询特殊字符(\,%和_)处理 * * @param string $str * @return string */ public static function like_se ...

  4. KNN算法和实现

    KNN要用到欧氏距离 KNN下面的缺点很容易使分类出错(比如下面黑色的点) 下面是KNN算法的三个例子demo, 第一个例子是根据算法原理实现 import matplotlib.pyplot as ...

  5. css---switch开关

    html: <label><input class="mui-switch" type="checkbox"> 默认未选中</la ...

  6. [洛谷P1966] 火柴排队

    题目链接: 火柴排队 题目分析: 感觉比较顺理成章地就能推出来?似乎是个一眼题 交换的话多半会往逆序对上面想,然后题目给那个式子就是拿来吓人的根本没有卵用 唯一的用处大概是告诉你考虑贪心一波,很显然有 ...

  7. 微信小程序page的生命周期和音频播放及监听

    一.界面的生命周期 /** * 监听页面加载, * 页面加载中 */ onLoad:function(){ var _this = this console.log('index---------on ...

  8. 并查集 (poj 1611 The Suspects)

    原题链接:http://poj.org/problem?id=1611 简单记录下并查集的模板 #include <cstdio> #include <iostream> #i ...

  9. PAT甲级——A1091 Acute Stroke【30】

    One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the re ...

  10. StringBuffer清空

    转载自:http://blog.sina.com.cn/s/blog_56fd58ab0100qfcz.html 在开发程序的时候,经常使用StringBuffer来进行字符串的拼接.如果在循环中来反 ...