MYSQL的建立,前面初始时,用https://blog.youkuaiyun.com/weixin_30631587/article/details/95530219
指令bin/mysqld_safe --user=mysql &
拿密码,文 件权限用这个
https://blog.youkuaiyun.com/qq_30000313/article/details/85333971?utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs
安装Nginx
https://blog.youkuaiyun.com/weixin_40985590/article/details/100086490
安装PHP 7
https://blog.youkuaiyun.com/weixin_43507341/article/details/112603545
安装MYSQL总是出问题时,就用ps -ef | grep mysql
kill -9 进程
报错时紧急处理
启动mysql服务
service mysql start
链接socket文件至/tmp/目录下ps -ef | grep mysql
ln -s /var/lib/mysql/mysql.sock /tmp/
添加mysql命令快捷访问
ln -s /usr/local/mysql/bin/mysql /usr/bin/
使用初始密码登录mysql服务
mysql -u root -p
更新密码
alter user 'root'@'localhost' identified by 'root';
flush privileges;
开启远程连接权限
update user set host='%' where user='root';
flush privileges;
或者
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;其中%可以替换成指定主机ip,identified by后跟密码
flush privilege
MySQL5.7.21在Linux下安装教程_小苏少的博客-优快云博客
nginx/
2.3 启动
mkdir -p /var/tmp/nginx/client
/usr/local/nginx/sbin/nginx
1
2
2.4 设置软连接
ln -sf /usr/local/nginx/sbin/nginx /usr/sbin
1
2.5 检查
nginx -t
1
结果:
nginx: the configuration file /usr/local/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/nginx.conf test is successful
Centos7安装Nginx+PHP+MySQL+Redis_高效&&开源-优快云博客
curl 127.0.0.1

被折叠的 条评论
为什么被折叠?



