PHP编译报错configure: error: Cannot find libmysqlclient under /usr.
今天编译PHP的时候遇到了几个错误,记录一下第一次编译的时候报错如下:configure: error: mcrypt.h not found. Please reinstall libmcrypt.报这个错是因为没有安装libmcrypt这个包,下载地址如下:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz安装:[root@localhost a...
linux系统上怎么从tar包里解压单个文件
前天有个朋友QQ问我怎么从一个tar压缩包里解压一个文件,而不是全部解压这几天实在是太忙了,今早抽个时间给他做了个示范,也顺便记录一下,希望能帮到一些朋友。首先我创建了一个tar包:[oracle@goolen test]$ ls -ltotal 80084-rw-r--r-- 1 oracle oinstall 81998360 Jul 30 09:52 test.tar.gz我们要想解压tar包...
mysqldump: Got error: 1146: Table
今早想对我的mysql测试哭做个备份的时候出现错误如下:[root@meizi ~]# mysqldump -uroot -p goolen > goolen.sql Enter password: mysqldump: Got error: 1146: Table 'goolen.ggschkpt' doesn't exist when using LOCK TABLES[root@meizi ~]# mysql -uroot -pEnter password: ...
彻底搞明白find命令的-mtime参数的含义
以前一直没有弄明白find的 -mtime参数的真正含义刚好今天跟一个同学聊起这个事我在写shell脚本的时候,定时删除一些文件的时候,也经常用得到-mtime这个参数,所以打算好好看看,把它弄明白一下man find里的解释:-mtime nFile’s data was last modified n*24 hours ago. See the comments for &n...
Table already exists error when the table does not exist
今天在一套mysql的库里发现一个问题,要创建一个表的时候,提示这个表已经存在,要drop的时候,提示此表不存在mysql> CREATE TABLE cms_attach_source (id int); ERROR 1050 (42S01): Table '`koo_cms`.`cms_attach_source`' already existsmysql>&...
log file switch (checkpoint incomplete)
早上开发的过来找我,说连接内网测试库的时候特别慢,偶尔还会超时我ping了一下网络,没有问题登录到机器上,直接sqlplus连接,同样的连接很慢查看了一下CPU和负载信息,没有问题检查了监听,监听日志,DNS/hosts解析,也没有问题iostat查看了一下磁盘IO,发现sdb1 的IO很高,那连接慢,估计就是因为IO高导致的因为最...
查看表数据的DML时间
今早来上班看到 “@夜无伤” 在群里发的消息,说是可以查看表数据的最后DML时间隐约记得我之前看过相关的文章,查了下笔记,还是被我给找到了,今天重新拿出来实验一下SQL> select * from v$version where rownum=1;BANNER---------------------------------------------------------------------------------------...
mysql导入sql文件的时候报错Segmentation fault
今天用crontab定时同步一个用户的数据,发现脚本执行失败了错误日志如下:begin imp exam at: 2014-05-06 00:00:38/mysql/task/imp_exam_everyday.sh: line 4: 11989 Segmentation fault /mysql/app/mysql/bin/mysql -S /tmp/mysql_3301.sock -uroot -proot exam < /home/exam/exam.sqlend...
Error: 13, Can't get stat of 'import.data' (Errcode: 13)
mysqlimport导入数据的时候报错:[root@library xiaoming]# mysqlimport -uroot -pXXXXX -S /tmp/mysql_3301.sock --fields-terminated-by=" ," --columns=id,type,username,datetime,logtype klb /root/xiaoming/import.datamysqlimport: Error: 13, Can't get stat of '/root/xiaoming/import.data' (...
Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js
mongodb所在的目录权限被更改导致mongodb意外down机启动报错:Tue Apr 15 02:49:13.417 [journal] warning: open of lsn file failedTue Apr 15 02:50:25.482 [journal] In File::open(), ::open for '/tol/mongodb/data/journal/lsn' failed with errno:13 Permission deniedTue Apr 15 02:50:25.482 [journal...
创建存储过程报ORA-00904
刚刚开发的同事来找我,在内网数据库上为一个表添加了字段后,再创建存储过程时候报错,提示新加的这个字段无效Warning: Procedure created with compilation errors.SQL> show errorErrors for PROCEDURE CB_DATE_MODIFY:LINE/COL ERROR-------- -------------------------------------------------------...
delete from file$ where file#=5
+++此次测试在归档模式下进行,通过delete file#来清除dbfile记录SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /opt/a...
通过dblink查询数据,commit和rollbak按钮会变亮
刚刚开发的同事问我,为什么他执行一条普通的select语句,PL/SQL里的commit和rollback按钮会变亮,觉得请奇怪,也实验了一把,确实是这样网上搜了一下资料,发现其实是因为查询的表使用了dblink导致查询一下,确实是这样:挺有趣,记录一下,没有去深究这个问题,感觉影响不大,应该是开...
linux上修改主机名对oracle启动关闭的影响
+++10gR2如果修改了主机名,没有更改/etc/hosts相应的信息,则数据库在关闭和启动的时候都会报错[oracle@oracle ~]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 6 19:19:30 2014Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected.SQL> SQL> SQL...
show parameter数据来源
+++使用10046跟踪show parameter命令的数据来源SQL> oradebug setmypidStatement processed.SQL> oradebug event 10046 trace name context forever,level 12Statement processed.SQL> show parameter sgaNAME ...
经典sql
昨晚看到同学在群里发的一个sql,感觉不错,记录一下,sql由Jordan 提供:SQL> select replace(reverse(sys_connect_by_path(reverse(rownum || '*' || lv || '=' || rpad(rownum * lv, 2)),'/ ')),'/') 2 from (select level lv from dual connect by level < 10) 3 where lv...
repair failure修复坏块
刚刚逛论坛,看到一个网友说他dd破坏的块用repair failure修复不了,我这里也实验一把试试测试之前先做一个备份RMAN> backup database;Starting backup at 12-MAR-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=5 device type=DISKchann...
corrupt block导致rman备份失败
用rman备份测试库的时候报错,信息如下:RMAN> backup database;Starting backup at 12-MAR-14allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=5 device type=DISKchannel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number...
ORA-38104: Columns referenced in the ON Clause cannot be updated: "U"."USER_ID"
在用merge语句更新一个表的时候报错:SQL> merge into OUTSITE_USERINFO u 2 using tmp_update_newlib ut 3 on (u.user_id = ut.NEWCOURSE_ID) 4 when matched then 5 update set u.user_id = ut.NEWL...
ORA-02020: too many database links in use
查询一个sql报错如下:ERROR at line 113:ORA-02020: too many database links in useCause:The maximum number of active connections to remote databases per user logon has been reached. Action:If the user has no open cursors, the current SQL statement accesses more than the maximum allow...