今天在往mysql中上传文件的时候,发现有的文件插入失败。
经过检查是max_allowed_packet 这个参数决定的。
修改my.ini 中
max_allowed_packet = 10M
导出csv
select * from test_info
into outfile ‘/tmp/test.csv’
fields terminated by ‘,’ optionally enclosed by ‘”‘ escaped by ‘”‘
lines terminated by ‘\n’;
导入csv
…
MySQL字符集设置
• 系统变量:
– character_set_server:默认的内部操作字符集
– character_set_client:客户端来源数据使用的字符集
– character_set_connection:连接层字符集
– character_set_results:查询结果字符集
– character_set_database:当前选中数据库的默认字…
[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
缺少一个参数 …
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){
…
1,主题所使用的文件夹在wp-content/themes/所对应的主题文件夹
主题里边有—–functions.php(主题所用的函数主要在这个里边),在本文件中添加如下代码:
register_nav_menus(array(‘header-menu’ => __( ‘导航自定义菜单’ ),));//即注册导航菜单
2,在所用主题文件夹中的header.php文件…
今天在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…
几次在编译php的时候加入–with-gd ,在make test 的时候都提示有错误。
我查看了centos默认安装的php-gd中,有gd.so文件和gd.ini的配置。我就干脆从centos 5.5安装盘中找到这php-gd-5.1.6-27.el5.i386.rpm这个安装包,然后把它直接解开试试。如果直接用rpm来安装的话,又要提示少这个少那个了。
rpm包是采用cap封装…
无意中发现我的网站有时候访问是全部空白,httpd是启动起来了。但是在连接mysql的时候,却提示找不到/var/mysql/mysql.sock。
这个文件确实不在了,而通过netstat -ntlp 发现mysql还在监听。只有到mysqld的错误日志里看看是什么问题了。
110413 23:28:46 mysqld_safe mysqld from pid file /usr/l…