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

solaris下mysql数据库字符集

solaris下mysql安装完毕后执行如下操作,可以修改数据库字符集,设置MySQL在Solaris上表名不区分大小写
1.拷贝文件如下:
cp /usr/sfw/share/mysql/my-medium.cnf /etc/my.cnf
把文件只读属性去掉
chmod +w my.cnf
 
2 设置mysql的字符集:在/etc/my.cnf中的mysqld段和client段加入代码:
 
[client]
default_character_set=gbk
[mysqld]
default_character_set=gbk
 
3 MySQL在Solaris上表名是区分大小写的(case sensitive)。但MySQL在Windows下都不区分大小写。只能修改它的设置,在/etc/my.cnf中增加一行,并放在[mysqld]段:
 
lower_case_table_names = 1
 
参数解释:0:区分大小写  1:不区分大小写
 
 MySQL在Linux下数据库名、表名、列名、别名大小写规则是这样的:
 1)数据库名与表名是严格区分大小写的;
 2)表的别名是严格区分大小写的;
 3)列名与列的别名在所有的情况下均是忽略大小写的;
 4)变量名也是严格区分大小写的;
 


相关文档:

11 advanced MySQL questions

 

Explain MySQL architecture
. - The front layer
takes care of network connections and security authentications, the
middle layer does the SQL query parsing, and then the query is handled
off to the storage engine. A storage engine could be either a default
one supp ......

mysqli与mysql区别

 mysql是非持继连接函数而mysqli是永远连接函数。也就是说
mysql每次链接都会打开一个连接的进程而mysqli多次运行mysqli将使用同一连接进程,从而减少了服务器的开销
有些朋友在编程的时候,使用new mysqli('localhost', usenamer', 'password', 'databasename');总是报错,Fatal error: Class 'mysqli' not found in ......

mysql 5.0存储过程学习总结

 
mysql 5.0存储过程学习总结
一.创建存储过程
1.基本语法:
create procedure
sp_name()
begin
………
end
2.参数传递
二.调用存储过程
1.基本语法:call
sp_name()
注意:存储过程名称后面必须加括号,哪怕该存储过程没有参数传递
三.删除存储过程
1.基本语法:
drop procedure ......

mysql alter 语句用法,添加、修改、删除字段

//主键
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//增加一个新列
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//删除列
alter table t2 drop column c;
//重命名列
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号