Monthly Archive: April 2015

MySQL忘记root密码的解决方案 0

MySQL忘记root密码的解决方案

首先,在/etc/my.cnf中,找到[mysqld],添加一行:
skip-grant-tables

重启MySQL:
/etc/init.d/mysql restart

进入MySQL的命令行,并依次执行如下命令:

其中的’newpwd’是更改后的新密码,需要用户重新指定。

重新打开/etc/my.cnf,将刚才修改的地方改回初始状态。

再次重启MySQL:
/etc/init.d/mysql[......]

Read more

Fix nginx increase server_names_hash_bucket_size error 0

Fix nginx increase server_names_hash_bucket_size error

When adding new virtual hosts in your nginx configuration file, you can experience this error message:

server_names_hash_bucket_size controls the maximum length of a virtual host entry (ie the length of the domain n[……]

Read more