
MySql 数据库
JeamKing
这个作者很懒,什么都没留下…
展开
-
1044-Access denied for user 'root'@'%' to database databaseTest 错误
在MySql中创建存储过程时报1044-Access denied for user root@% to database databaseTest 错误。解决办法:登录用户开通 create routine, alert routine, excute 控制存储过程操作的权限。原创 2009-11-27 14:04:00 · 9239 阅读 · 1 评论 -
MySQL 配置优化
MySQL 配置优化安装MySQL后,配置文件my.cnf在 /MySQL安装目录/share/mysql目录中,该目录中还包含多个配置文件可供参考,有my-large.cnf ,my-huge.cnf, my-medium.cnf,my-small.cnf,分别对应大中小型数据库应用的配置。win环境下即存在于MySQL安装目录中的.ini文件。 下面列出了对性能优化影响较转载 2015-03-03 11:52:19 · 762 阅读 · 0 评论 -
linux系统下无法创建mysql存储过程问题
创建存储过程的完整命令:CREATE PROCEDURE pro1()begin declare b int default 0;end;mysql中运行存储过程创建语句错误结果:root@db1>CREATE PROCEDUREpro1() -> begin -> declare b int default 0;ERROR 1064 (原创 2013-07-18 18:07:16 · 2963 阅读 · 0 评论 -
1045- Access denied for user ‘test’@’192.168.31.192’(using password:YES)
Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE原创 2011-06-29 18:13:00 · 5537 阅读 · 0 评论 -
mysql str_to_date字符串转换为日期
<br />mysql内置函数,在mysql里面利用str_to_date()把字符串转换为日期。<br />示例:分隔符一致,年月日要一致<br /> <br />select str_to_date('2008-4-2 15:3:28','%Y-%m-%d %H:%i:%s');<br /><br />select str_to_date('2008-08-09 08:9:30', '%Y-%m-%d %h:%i:%s');原创 2010-10-20 13:45:00 · 149628 阅读 · 6 评论 -
mysql limit查询优化
<br />MySQL的优化是非常重要的。其他最常用也最需要优化的就是limit。MySQL的limit给分页带来了极大的方便,但数据量一大的时候,limit的性能就急剧下降。<br /> 同样是取10条数据<br /> select * from yanxue8_visit limit 10000,10 和<br /> select * from yanxue8_visit limit 0,10 <br /> 就不是一个数量级别的。<br /> 网上也很多关于limit的五条优化准则,都转载 2010-08-20 09:32:00 · 782 阅读 · 0 评论 -
MySql 日期和时间函数
http://dev.mysql.com/doc/refman/5.1/zh/functions.html#date-and-time-functions<br />日期和时间函数<br /><br /> 本章论述了一些可用于操作时间值的函数。关于每个时间和日期类型具有的值域及指定值的有效格式,请参见11.3节,“日期和时间类型”。<br /> 下面的例子使用了时间函数。以下询问选择了最近的 30天内所有带有date_col 值的记录:<br /> mysql> SELECT转载 2010-06-03 11:18:00 · 1692 阅读 · 0 评论 -
mysql 子查询删除记录
mysql 可以通过子查询得到要删除的记录条件,然后通过子查询得结果匹配要删除的记录。但是 mysql 不能直接删除子查询表中的数据,必须通过一个临时表来解决。例如: delete from t_transaction where exists (select d.* from t_ti_category a,t_category b,t_trade_item c,t_原创 2010-04-21 09:07:00 · 6421 阅读 · 1 评论 -
MySql 资料网站
http://www.mysqlpub.com/site/html/bbs.html MySql pub 论坛原创 2010-03-05 10:07:00 · 870 阅读 · 0 评论 -
MySQL存储过程例子,包含事务,参数,嵌套调用,游标,循环等
转自:http://111cn.cn/database/110/a413d2d888f7a23e9d9ef3b4866cea3d.htmMySQL存储过程例子,包含事务,参数,嵌套调用,游标,循环等drop procedure if exists pro_rep_shadow_rs; delimiter | -----------------------------转载 2010-03-05 10:00:00 · 2372 阅读 · 1 评论 -
MySql 存储过程使用游标循环插入数据示例
本示例通过 while...end while 循环控制游标来实现插入表记录。DROP PROCEDURE IF exists pro_initCategoryForTradingEntity;create procedure pro_initCategoryForTradingEntity(tradingEntityId int)begin declare f_parent原创 2010-03-05 09:49:00 · 37070 阅读 · 3 评论 -
MySql 存储过程游标使用示例
DROP PROCEDURE IF exists pro_removeBillRemindByUserId;create procedure pro_removeBillRemindByUserId(userId int)begin declare ts varchar(500); declare cnt int default 0; declare f_ID原创 2010-03-04 09:56:00 · 1693 阅读 · 0 评论 -
linux环境mysql 数据库安装
mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz下载:系统版本:[mysql@localhost scripts]$ uname -aLinux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU原创 2017-07-31 15:54:48 · 881 阅读 · 0 评论