1.安装mysql的客户端与服务器端

  $>sudo apt-get install mysql-server mysql-client

2.管理服务
  1.启动

  $>sudo service mysql start

  2.停止

  $>sudo service mysql stop

  3.重启

  $>sudo service mysql restart

3.配置允许远程连接
  1.找到mysql配置文件并修改

  $>sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
  # bind-address=127.0.0.1 # 注释本行

  2.登录mysql,运行如下命令

  # 给root用户授予在任意主机(%)访问任意数据库的所有权限
  # grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;
  mysql>grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;  # 我的密码是root
  mysql>flush privileges;

  3.重启mysql

  $>sudo service mysql restart

最新文章

  1. 用django创建一个项目
  2. web标准之道——笔记
  3. 云计算CTO工作的具体内容(挺详细)
  4. C# DateTime 格式化 奇怪问题!
  5. A除以B问题
  6. 仿写自己的一个加载语言包的L函数
  7. sql sever怎样替换把表中数据。
  8. 读Zepto源码之fx_methods模块
  9. Spring Cloud 2-RabbitMQ 集成(八)
  10. 经测试稳定可用的蓝牙链接通信Demo,记录过程中遇到的问题的思考和解决办法,并整理后给出一个Utils类可以简单调用来实现蓝牙功能
  11. js 字符串截取函数substr,substring,slice之间的差异
  12. [转] XEN, KVM, Libvirt and IPTables
  13. javaScript遍历对象、数组总结
  14. 『编程题全队』Beta 阶段冲刺博客一
  15. sqli-labs学习笔记 DAY5
  16. 【RF库Collections测试】Copy Dictionary
  17. 【CF1157F】Maximum Balanced Circle 求一个相邻元素之间绝对值为小于1的最大环
  18. Linux环境下c语言静态链接库和动态链接库创建和使用
  19. java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 异常处理,及MySQL数据库编码设置
  20. shell中的常用通配符,字符类

热门文章

  1. Douglas-Peucker 轨迹压缩算法
  2. bzoj 4519: [Cqoi2016]不同的最小割【最小割树Gomory–Hu tree】
  3. nginx 配置tp3.2
  4. PowerDesigner在PDM转换为sql脚本时报错Generation aborted due to errors detected during the verification of the mod
  5. ACM_给你100块钱
  6. jmeter(十二)处理Cookie与Session
  7. Java_JDBC连接数据库_使用读取配置文件的方式
  8. Wamp搭建的服务器登录的时候出现Access denied for user 'hello'@'localhost' (using password: YES)
  9. 微信小程序组件解读和分析:七、button按钮
  10. Fragment懒加载预加载