ubuntu 16.04 安装 apache2 php7 mysql

apt-get update
apt-get upgrade

apt-get install apache2

apt-get install php

apt-get install libapache2-mod-php7.0

service apache2 restart

apt-get install vim -y
highlight Comment guifg=seagreen ctermfg=darkmagenta

apt-get install mysql-server
默认只能本地访问,修改
vi /etc/mysql/mysql.conf.d/mysqld.cnf
注释掉:bind:127.0.0.1

user mysql
select host,user from user;
update user set host='%' where user='root';
grant all privileges on *.* to root@"%";
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678' WITH GRANT OPTION;
flush privileges;
set global validate_password_policy=0;
SET PASSWORD FOR 'root'@'%' = PASSWORD('12345678');


sudo chmod -R 755 /var/lib/mysql/


发表于:2016-11-20 16:10:13

原文链接(转载请保留): http://www.multisilicon.com/blog/a30322058.html

友情链接: MICROIC
首页