美文网首页
MySQL操作

MySQL操作

作者: bbdlg | 来源:发表于2019-02-10 09:29 被阅读6次

    终端登录MySQL:

    mysql -uroot -p

    创建远程用户并赋予操作某个数据库的权限:

    grant all privileges on newdb.* to 'newuser'@'%' identified by 'newpassword' with grant option;
    myslq> flush privileges;

    创建新的MySQL用户:

    create user test identified by '123456';

    查看所有MySQL用户:

    select host, user from mysql.user;

    如仍然无法远程连接,打开mysql文件,注释掉如下部分:

    bind-address = 127.0.0.1

    相关文章

      网友评论

          本文标题:MySQL操作

          本文链接:https://www.haomeiwen.com/subject/krsasqtx.html