今天在往mysql中上传文件的时候,发现有的文件插入失败。 经过检查是max_allowed_packet 这个参数决定的。 修改my.ini 中 max_allowed_packet = 10M 就可以了。 Read the rest of this entry
Archive for the ‘AMP’ Category
[AMP] Mysql 导入导出csv
导出csv select * from test_info into outfile ‘/tmp/test.csv’ fields terminated by ‘,’ optionally enclosed by ‘”‘ escaped by ‘”‘ lines terminated by ‘\n’; 导入csv … Read the rest of this entry
[AMP] Mysql 字符集设置
MySQL字符集设置 • 系统变量: – character_set_server:默认的内部操作字符集 – character_set_client:客户端来源数据使用的字符集 – character_set_connection:连接层字符集 – character_set_results:查询结果字符集 – character_set_database:当 Read the rest of this entry
[AMP] mysqlimport: Error: 13, Can’t get stat of
[root@sun ~]# mysqlimport –fields-terminated-by=, –lines-terminated-by=\n ziliao ./a.csv mysqlimport: Error: 13, Can’t get stat of ‘/var/lib/mysql/a.csv’ (Errcode: 2), when using table: a 缺少一个参数 … Read the rest of this entry
[AMP] 无觅
怎么我把无觅插件删除以后,怎么在feed输出中还显示呢? 原来是有缓存的结果啊,那么feed的缓存保存在哪里呢? Read the rest of this entry
[AMP] wordpress 从apache到nginx
nginx里的重定向 location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ … Read the rest of this entry
[AMP] wordpress中让主题支持菜单导航
1,主题所使用的文件夹在wp-content/themes/所对应的主题文件夹 主题里边有—–functions.php(主题所用的函数主要在这个里边),在本文件中添加如下代码: register_nav_menus(array(‘header-menu’ => __( ‘导航自定义菜 Read the rest of this entry
[AMP] php-header
今天在apache的错误日志中发现如下一行: [Fri Apr 15 02:09:40 2011] [error] [client 119.177.37.124] PHP Warning: Header may not contain more than a single header, new line detected. in /www/blog/wp-content/plugins/ba… Read the rest of this entry
[AMP] php支持gd库
几次在编译php的时候加入–with-gd ,在make test 的时候都提示有错误。 我查看了centos默认安装的php-gd中,有gd.so文件和gd.ini的配置。我就干脆从centos 5.5安装盘中找到这php-gd-5.1.6-27.el5.i386.rpm这个安装包,然后把它直接解开试试。 Read the rest of this entry
[AMP] mysql down
无意中发现我的网站有时候访问是全部空白,httpd是启动起来了。但是在连接mysql的时候,却提示找不到/var/mysql/mysql.sock。 这个文件确实不在了,而通过netstat -ntlp 发现mysql还在监听。只有到mysqld的错误日志里看看是什么问题了。 Read the rest of this entry