zoukankan      html  css  js  c++  java
  • mysql create user

    #create a root password for


    mysqladmin -u root password '19740415'


    create user sil
    mysql> CREATE USER sil IDENTIFIED BY '123';


    Host | User
    | %  | sil


    then we must grant permission to sil user.
    mysql> grant all on *.* to 'sil'@localhost' identified by '123'


    sudo service mysqld stop


    sudo service mysqld start


    login use the user sil
    mysql> mysql -u sil -p
    Enter password: 123

    should be able login with the user: sil


    Creat a new user account using script

    insert into mysql.user (Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("localhost","pppadmin",password("1234"),'','','');

    grant all on test.* for 'pppadmin'@'localhost' identified by '1234'

    sudo service mysqld stop

    sudo service mysqld start

    login use the user pppadmin
    mysql> mysql -u pppadmin -p
    Enter password: 1234

    should be able login with the user: pppadmin

  • 相关阅读:
    字符串的操作
    前端
    HTML标签
    模块与包
    常用模块
    函数进阶
    函数初识
    文件操作
    集合及深浅拷贝
    python中的一些编码问题
  • 原文地址:https://www.cnblogs.com/greencolor/p/2314540.html
Copyright © 2011-2022 走看看