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

  •  

posted on 2020-12-01 23:22  陕西小楞娃  阅读(40)  评论(0编辑  收藏  举报