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;
     
     
     
  • 相关阅读:
    Dom对象,控制html元素
    运算符总结
    数组
    变量命名规则
    css实现气泡说明框
    深入理解CSS中的层叠上下文和层叠顺序
    jquery书写
    二级导航
    iis配置
    Android ListView无法触发ItemClick事件
  • 原文地址:https://www.cnblogs.com/m-zone/p/9081107.html
Copyright © 2011-2022 走看看