更改网站的存放目录和MySQL的数据库存放目录【失败】
按照常见问题方式更改网站的存放目录和MySQL的数据库存放目录【失败】首先修改了/usr/local/nginx/conf中nginx.conf
server
{
listen 80;
server_name www.laixihe.com;
index index.html index.htm index.php;
root/data/laixihe;
/data/laixihe为我的新目录。
然后执行:cp -R /home/wwwroot/ /data/laixihe,chown www:www -R /data/laixihe 。
MySQL目录的更改,
首先停掉mysql服务器/etc/init.d/mysql stop,
然后cp -R /usr/local/mysql/var/ /data/laixihe/ ,
再chown mysql -R /data/laixihe/
再修改/etc/my.cnf ,查找 ,在下面加入datadir = /data/mysql/ 保存,
启动mysql。
以上是根据官方提供的方法操作。但是
http://www.laixihe.com/p.php 指针还是在原来的盘
http://www.laixihe.com/phpmyadmin/ #2002 无法登录 MySQL 服务器
http://www.laixihe.com/ftp/
Error: MySql server not found.
MySql error : Lost connection to MySQL server at 'reading initial communication packet', system error: 111 我是在添加了虚拟主机后执行的此操作 nginx可能没重启
mysql没错误日志没法说原因
页:
[1]