文章分类 -  MySQL

摘要:http://eblog.nenu.edu.cn/user1/easter/archives/2008/1852.html一、MySQL 获得当前日期时间 函数1.1 获得当前日期+时间(date + time)函数:now()mysql> select now();+---------------------+| now() |+---------------------+| 2008-08-08 22:20:46 |+---------------------+除了 now() 函数能获得当前的日期时间外,MySQL 中还有下面的函数: current_time... 阅读全文
posted @ 2012-12-25 15:13 Alex~ 阅读(209) 评论(0) 推荐(0)
摘要:LOAD DATA INFILE 'E://temp//data.txt' IGNORE INTO TABLE cell_definition_test CHARACTER SET gbk FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (cgi,msc_id,title,shape_type,lon,lat,radius,angle) 阅读全文
posted @ 2011-09-28 16:07 Alex~ 阅读(994) 评论(0) 推荐(0)
摘要:MySQL管理员应该知道如何设置MySQL用户账号,指出哪个用户可以连接服务器,从哪里连接,连接后能做什么。MySQL 3.22.11开始引入两条语句使得这项工作更容易做:GRANT语句创建MySQL用户并指定其权限,而REVOKE语句删除权限。两条语句扮演了mysql数据库的前端角色,并提供与直接操作这些表的内容不同的另一种方法。CREATE和REVOKE语句影响4个表:还有第5个授权表(host),但它不受GRANT和REVOKE的影响。 当你对一个用户发出一条GRANT语句时,在user表中为该用户创建一条记录。如果语句指定任何全局权限(管理权限或适用于所有数据库的权限),这些也记录在u 阅读全文
posted @ 2011-09-28 16:04 Alex~ 阅读(1020) 评论(0) 推荐(0)
摘要:--grant 操作 MySQL 表操作的所有权限 GRANT ALL ON db.* TO 'root'@'192.168.2.%' IDENTIFIED BY "root"--grant 操作 MySQL 外键权限 grant references on root.* to 'root'@'192.168.2.%';--grant 操作 MySQL 临时表权限 grant create temporary tables on root.* to 'root'@'192.168.2.% 阅读全文
posted @ 2011-09-28 16:03 Alex~ 阅读(183) 评论(0) 推荐(0)