开启MYSQL日志配置
在[mysqld] 下添加参数如下
#错误日志输出路径(使用/作为分割而不是\)
log-error="your error-log path"
log="Your mysql log path"
log-show-queries="Your slowquery path"
#设定超时时间 此处设置为两秒
long_query_time=2
Ok save my.ini
next
#停止mysql 服务
net stop mysql
#重新开始服务
net start mysql
相关文档:
MySQL的字符集支持(Character Set Support)有两个方面:
字符集(Character set)和连接校对(Collation)。
对于字符集的支持细化到四个层次:
服务器(server),数据库(database),数据表(table)和连接(connection)。
1.MySQL默认字符集
MySQL对于字符集的 ......
select
count(*) as mcount ,
left(create_time,10) as ptime ,
count(if(receive_msg is null,id,null)) as nullcount ,
count(if(receive_msg = '1',receive_msg,null)) as apfcount ,
count(if(receive_msg = '2',receive_msg,null)) as dttcount ,
count(if(receive_msg = '3',receive_ms ......
前几天公司让我做C语言和MySQL数据库的交互操作,费了九牛二虎之力之后总算做出来了,今天特地把源代码贴出来供大家学习;如有人想要打包项目可以加我QQ260990509,注明技术交流,即可获得打包之后的项目!
#if defined(_WIN32) || defined(_WIN64) //为了支持windows平台上的编译
#include <windows.h>
#end ......
关于MySQL表设计应该注意的问题
转自 http://blog.chinaunix.net/u/29134/showart_1316574.html
1、慎重选择表名。
有两种选择:
按照多数开发语言的命名规则。比如(myCustomer)。
按照多数开源思想命名规则。比如(my_customer)。
按照咱们中国人的思想。比如(我的客户)。
第一种有个缺点,很容易忘掉大写的字 ......
要安装 MySQL,可以在终端提示符后运行下列命令:
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// 安装php5-mysql 是将php和mysql连接起来
一旦安装完成,MySQL 服务器应该自动启动。您可以在终端提示符后运行以下命令来检查 MySQL 服务器是否正在运行:
......