phpMyAdmin导入文件限制:
修改php.ini
upload_max_filesize = 50M
post_max_size = 50M
终端导入数据库:
mysql -u root -p database_name < filename.sql
关闭和打开外键检查:
- SET FOREIGN_KEY_CHECKS = 0;
-
SET FOREIGN_KEY_CHECKS = 1;
关闭和打开索引:
- LOCK TABLES `test` WRITE;
-
ALTER TABLE `test` DISABLE KEYS ;
-
ALTER TABLE `test` ENABLE KEYS;
-
UNLOCK TABLES;
DELAY_KEY_WRITE:
这个参数只对 MyISAM有效,可以再create table 时指定 delay_key_write ,如果表已经存在可以使用 alter table sometable delay_key_write =1;
建立和删除索引
- DROP INDEX email ON fuinfo;
-
CREATE UNIQUE INDEX email ON fuinfo(email);
-
CREATE UNIQUE INDEX email_fid ON fuinfo(email, fid);
-
DROP INDEX email_fid ON fuinfo;
-
DROP INDEX email ON fuinfo;
所有目录755 所有文件644
- find . -type d -print0 | xargs -0 chmod 0755
-
find . -type f -print0 | xargs -0 chmod 0644
flush dns cache
- Flush nscd dns cache
-
-
Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is able to speed up consecutive access to the same data dramatically and increase overall system performance. Just restart nscd:
-
$ sudo /etc/init.d/nscd restart
-
OR
-
# service nscd restart
-
-
Flush dnsmasq dns cache
-
-
dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. This software is also installed many cheap routers to cache dns queries. Just restart to flush out dns cache:
-
$ sudo /etc/init.d/dnsmasq restart
-
-
Flush caching BIND server dns cache
-
-
A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache:
-
# /etc/init.d/named restart
ini_set
- if(!ini_get('safe_mode')) {
-
set_time_limit(240);
-
ini_set('memory_limit', '16M');
-
ini_set('upload_max_filesize', '10M');
-
ini_set('post_max_size', '10M');
-
ini_set('max_input_time', 300);
-
}
阅读(975) | 评论(0) | 转发(0) |