首页 > 代码库 > ubuntu16全程安装mysql5.7.15!

ubuntu16全程安装mysql5.7.15!

ubuntu16全程安装mysql5.7.15!


ubuntu16安装mysql5.7.15;


sudo dpkg -i  mysql-common_5.7.15-1ubuntu16.04_amd64.deb 

sudo apt-get -f install

sudo apt-get install libaio-dev

sudo dpkg -i mysql-community-client_5.7.15-1ubuntu16.04_amd64.deb 

sudo dpkg -i mysql-client_5.7.15-1ubuntu16.04_amd64.deb 

sudo dpkg -i mysql-community-server_5.7.15-1ubuntu16.04_amd64.deb 

sudo dpkg -i mysql-server_5.7.15-1ubuntu16.04_amd64.deb 


查看mysql服务

sudo service mysql status

mysql -uroot -proot

出错,

ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)


修改root密码:

sudo mysqld_safe --skip-grant-tables &


mysql -uroot;


mysql> use mysql;


mysql> update user set authentication_string=password(‘root‘) where user=‘root‘;


mysql> flush privileges;

exit


启动mysql服务:

sudo service mysql start




ubuntu16全程安装mysql5.7.15!