易截截图软件、单文件、免安装、纯绿色、仅160KB

mysql报错

报错:
 /tmp/ccBBJEB8.o: In function `ping_sql':
pingsql.c:(.text+0x7c): undefined reference to `mysql_init'
pingsql.c:(.text+0xe1): undefined reference to `mysql_real_connect'
pingsql.c:(.text+0xff): undefined reference to `mysql_close'
pingsql.c:(.text+0x119): undefined reference to `mysql_connect'
pingsql.c:(.text+0x198): undefined reference to `mysql_real_escape_string'
collect2: ld 返回 1
解决办法:
#gcc -o pingsql pingsql.c -lmysqlclient -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql


相关文档:

linux下查看nginx,apache,mysql,php的编译参数

有时候nginx,apache,mysql,php编译完了想看看编译参数可以用以下方法
nginx编译参数:
#/usr/local/nginx/sbin/nginx -V
CODE:
nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mo ......

有关于Mysql的MERGE表类型

 他将多个表在逻辑上当作一个表来查询。他建立后有两个文件,
  .frm 表结构定义
  .mrg union表的名字清单
  两个基本表:
  CREATE TABLE TEST_MERGE_1(
  ID INT(5) NOT NULL,
  VALUE VARCHAR(100) NOT NULL,
  PRIMARY KEY(ID)
  )
  CREATE TABLE TEST_MERGE_2(
  ID INT(5) NOT N ......

通过show status 来优化MySQL数据库

 
2009年10月30日 星期五 22:53
1, 查看MySQL
服务器配置信息
mysql> show variables;
mysql> show variables;
2, 查看MySQL服务器运行的各种状态值
mysql> show global status;
mysql> show global status;
3, 慢查询
mysql> show variables like '%slow%';  
+--------------- ......

Penrose连接Mysql解决方案

 最近一直在进行Penrose连接Mysql的尝试,可总是提示无法连接到Mysql,无论是检查端口是否开启,设置Mysql远程访问权限等都不管用,后来在Penrose的官网找到一个建立样例数据库及设置远程连接的文档,没想到一举成功,痛快啊!
下面就把文档和大家共享一下!(是英文,大家就凑合着看下吧!因为最近搞Penrose太累了, ......

Mysql编译安装参数优化

 1. -static  13%
   --with-client-ldflags=-all-static
   --with-mysqld-ldflags=-all-static
静态链接提高13%性能
2. -pgcc  1%
   CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \
     CXXFLAGS="-O3 -mpentiumpro -mstack-alig ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号