您的位置:首页 > 运维架构 > Nginx

nginx在centos中遇到无法正常启动问题,及mysql修改root用户的密码

2016-12-08 13:52 871 查看
进到nginx使用./nginx -s reload重新读取配置文件,发现报nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)错误,进到logs文件发现的确没有nginx.pid文件

 

[root@localhost sbin]# ./nginx -s reload

nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)

这里的路径是我的nginx的安装路径,如果没有logs文件夹,那么使用mkdir创建一个 例如:mkdir logs

解决方法:

[root@localhost nginx]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

在此附上修改mysql,root用户密码的操作
mysqladmin -u root -p
'oldpassword'

password 'newpassword'

[root@VM_30_234_centos local]# mysqladmin -uroot -proot password 123456

Warning: Using a password on the command line interface can be insecure.

[root@VM_30_234_centos local]# mysqladmin -u root -p'root' password '123456'

Warning: Using a password on the command line interface can be insecure.

mysqladmin: connect to server at 'localhost' failed

error: 'Access denied for user 'root'@'localhost' (using password: YES)'

此时证明修改成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: