04 2014 档案
How to exit the entire application from a Python thread?
摘要:If all your threads except the main ones are daemons, the best approach is generally thread.interrupt_main() -- any thread can use it to raise a Keybo...
阅读全文
PHPExcel 导出2003和2007的excel文档实例
摘要:require_once 'common/excel/PHPExcel.php'; require_once 'common/excel/phpExcel/Writer/Excel2007.php'; require_once 'common/excel/...
阅读全文
centos配置虚拟主机virtualhost,让服务器支持多网站多域名(转)
摘要:如何让centos(redhat)配置虚拟主机,让服务器支持多个网站,针对Apache,只需要你修改apache配置文件/etc/httpd/conf/httpd.conf即可。里面有个example文件,你只要对应配置即可。## ServerAdmin webmaster@dummy-host.example.com# DocumentRoot /www/docs/dummy-host.example.com# ServerName dummy-host.example.com# ErrorLog logs/dummy-host.example.com-error_log# Cus...
阅读全文
mysql Access denied for user root@localhost错误解决方法总结(转)
摘要:mysql Access denied for user \'root\'@\'localhost\'”解决办法总结,下面我们对常见的出现的一些错误代码进行分析并给出解决办法,有需要的朋友可参考一下。错误代码 1045Access denied for user 'root'@'localhost' (using password:YES)解决办法是重新设置root用户密码,在Windows平台下操作步骤如下:1、以系统管理员身份登录到系统;2、如果MySQL服务器正在运行,停止它。 如果是作为Windows服务运行的服务器,进入
阅读全文
mysql的性能监控指标(转载)
摘要:这里列出了一些如何监视你安装的mysql性能的一些ideas。监视总是一个持续的过程。你需要知道哪种模式对你的数据库是好的,什么是问题的表象,甚至是危险的情况。一下列出了用来去监视你的系统的主要参数:- mysqladmin extended (绝对值)- mysqladmin extended -i10 -r (相对值)- mysqladmin processlist- mysql -e "show innodb status"- OS data. vmstat/iostat- MySQL error log- InnoDB tablespace info.1) mysq
阅读全文
mysql的show status详解(转载)
摘要:SHOW STATUS提供服务器的状态信息(象mysqladmin extended-status一样)。输出类似于下面的显示,尽管格式和数字可以有点不同:+--------------------------+--------+| Variable_name | Value |+--------------------------+--------+| Aborted_clients | 0 || Aborted_connects | 0 || Connections | 17 || Created_tmp_tables | 0 || Delayed_insert_threads | 0 |
阅读全文
MySQLAdmin的用法
摘要:mysqladmin 适合于linux和windows系统linux下:mysqladmin -u[username] -p[password] statuswindows下:先在安装目录找到mysqladmin.exe,然后在dos界面下change到这个目录,执行mysqladmin -u[username] -p[password] extended-status这里的extended-status 和status只是mysqladmin的两个参数而已!MySQLAdmin用法用于执行管理性操作。语法是:shell> mysqladmin [OPTIONS] command [co
阅读全文
linux 定时任务 crontab 详细解释(转)
摘要:cron 是linux的内置服务,但它不自动起来,可以用以下的方法启动、关闭这个服务:引用:/sbin/service crond start //启动服务/sbin/service crond stop //关闭服务/sbin/service crond restart //重启服务/sbin/service crond reload //重新载入配置//=========================================================================# Use the hash sign to prefix a comment# +-----
阅读全文
linux下mysql自动备份脚本
摘要:脚本放在 /home/user/mysql_backup.sh crontab # crontab -l # m h dom mon dow command 28 16 * * * /home/user/mysql_backup.sh 脚本如下 #!/bin/sh # mysql_backup.sh: backup mysql databases and keep newest 5 days backup. # # Last updated: 20 March 2006 # ------------------------------------------------------------
阅读全文
浙公网安备 33010602011771号