Ubuntu安装mysql

1. sudo apt-get install mysql-server

 
  2. apt-get install mysql-client
 

  3.  sudo apt-get install libmysqlclient-dev

测试一下是否安装成功。

sudo netstat -tap | grep mysql
tcp        0      0 localhost:mysql         *:*                     LISTEN      14531/mysqld    

登录:

mysql -u root -proot

创建数据库:

create database syy;

授权:

GRANT ALL PRIVILEGES ON *.* TO 'syy'@'172.16.0.4' IDENTIFIED BY 'root123#' WITH GRANT OPTION;

posted @ 2018-08-14 15:08  陆伟  阅读(125)  评论(0编辑  收藏  举报