zoukankan      html  css  js  c++  java
  • Ubuntu MySQL安装

    step1:安装

      sudo apt-get install mysql-server

      sudo apt isntall mysql-client

      sudo apt install libmysqlclient-dev

    检查是否安装成功:

      sudo netstat -tap | grep mysql

    step2:重启

      sudo service mysql restart

    step3:登录

      mysql -u root - p

    step4:授权

      grant all on *.* to root@'%' identified by '你的密码' with grant option;

      flush privileges;

    step5:远程连接问题

      sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

      注释 bind-address = 127.0.0.1

    扩展:

    mysql -u root -p
    insert into mysql.user(Host,User,Password values(‘localhost’,'jee’,password(‘jee’)); 
    flush privileges;
    grant select,insert,update,delete,create,drop on db.employee to jee@10.10.10.10 identified by ‘123′;

    给来自10.10.10.10的用户jee分配可对数据库db的employee表进行
    select,insert,update,delete,create,drop等操作权限,并设定口令为123;

    grant all privileges on db.* to jee@10.10.10.10 identified by ‘123′;
    给来自10.10.10.10的用户jee分配可对数据库db所有表进行所有操作的权限,并设定口令为123;
    grant all privileges on *.* to jee@10.10.10.10 identified by ‘123′;
    给来自10.10.10.10的用户jee分配可对所有数据库所有表进行所有操作的权限,并设定口令为123;
    grant all privileges on *.* to jee@localhost identified by ‘123′;
    给本机用户jee分配可对所有数据库所有表进行所有操作的权限,并设定口令为123;
     
     
     
  • 相关阅读:
    springboot整合mongdb
    自动垃圾收集机制
    类加载机制
    MacBook 虚拟机的选择
    Spark 学习之 spark-sql.sh的简单使用
    spark 学习之 hadoop搭建之 ssh免密码登录
    userdel account is currently in use
    linux 磁盘管理
    qt ui文件转换成python
    opensuse安装telegram客户端小计
  • 原文地址:https://www.cnblogs.com/m-zone/p/9081107.html
Copyright © 2011-2022 走看看