首页 > 技术文章 > Linux安装mysql

bigdata-familyMeals 2020-12-01 23:22 原文

linux安装mysql

  • 安装:yum install mysql-server

  • 启动服务: service mysqld start

  • mysql

    • 查看用户表: select host, user, password from user;

    • 授权(不能用insert,因为要加密):grant all privileges on * . * to 'root'@'%' identified by '123' with grant option;

    • 重启服务 或者 flush privileges;

    • 退出 quit

  • 开机启动: chkconfig mysqld on

  • 登录: mysql -uroot -p

  •  

推荐阅读