美文网首页
Ubuntu安装mysql

Ubuntu安装mysql

作者: 如沐春风_da89 | 来源:发表于2017-12-14 09:18 被阅读22次

    1.

    sudo apt-get install mysql-server

    2.

    sudo apt isntall mysql-client

    3.

    sudo apt install libmysqlclient-dev

    数据库安装完成

    4.为用户赋予远程连接

    5.数据库登录

    mysql -u root -p

    6.创建用户

    6.为用户赋予权限

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

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

    grant all on *.* to space@'%' identified by '

    mysql -uroot -p

    insert into mysql.user(Host,User,Password) values("%","space","space");

    grant all on *.* to space@'%' identified by 'space' with grant option;

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

    刷新权限

    flush privileges;

    相关文章

      网友评论

          本文标题:Ubuntu安装mysql

          本文链接:https://www.haomeiwen.com/subject/zxwaixtx.html