ChinaUnix.net
相关文章推荐:

mysql 脚本 运行

建立hi.sql文件: create table hi(name char(10),id char(4)); 用root用户登陆数据库: E:\mysql\bin>mysql -u root -p123 Welcome to the mysql monitor. Commands end with ; or \g. Your mysql connection id is 26 Server version: 5.0.37-community-nt mysql Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 更改数据库: mysql> use mysql; Database changed 运行脚本文件: mysql>...

by zhjianxia - MySQL文档中心 - 2007-08-29 10:37:12 阅读(803) 回复(0)

相关讨论

譬如建一日期字段,内容是到期日期。每天自动运行一个脚本,判断到期日期是否是今天,如果是今天就把一个字段改成0。 举个例子说,一个字段data,一个字段real(默认为1) 添加data字段为06/06/2007,real为1 每天自动运行一个脚本判断data字段是否是今天,如果是将real设为1 不需要帮我把语句全写出来,只想帮忙告诉我这个自动运行脚本应该放在哪里,怎么才能每天自动运行一次。谢谢

by yimibaer - MySQL - 2007-06-06 17:09:22 阅读(4512) 回复(7)

运行启动脚本可以启动mysql 启动机器启不来mysql 为什么???

by ICANFLYISURE - MySQL - 2003-10-29 09:56:22 阅读(932) 回复(0)

mysql> delimiter || mysql> create procedure sp_test_sleep() -> sql security invoker -> begin -> select 'sleep start'; -> select sleep(5); -> select 'sleep end'; -> end|| Query OK, 0 rows affected (0.03 sec) mysql> delimiter ; mysql> call sp_test_sleep(); +-------------+ | sleep start | +-------------+ | sleep start | +-------------+ 1 row in set (0.00 sec) +--...

by dandunn - MySQL文档中心 - 2008-09-18 17:50:57 阅读(1147) 回复(0)

请问我在freebsd5.21下安装好mysql-4.0.21,请问如何添加启动脚本令机器每次启动之后就自动运行呢?请多多指教,谢谢!

by wing-qiang - BSD - 2004-10-16 10:09:58 阅读(1435) 回复(5)

#!/sbin/sh # # Start, Stop and Restart script for mysql5.0.67 # #Set&Export Home Directory of mysql5.0.67 mysql_HOME=/usr/local/mysql export mysql_HOME #Add source command of mysql bin start_mysql=$mysql_HOME/bin/mysqld_safe --user=mysql & stop_mysql=$mysql_HOME/bin/mysqladmin -uroot -padmin shutdown #Add comment of script start(){ echo "-- Starting mysql5.0....

by m@qintoshi - Shell - 2008-12-12 15:21:33 阅读(1620) 回复(8)

mysql_query($query); $myrow = mysql_fetch_array($rs); $numrows=$myrow[0];//总记录数 $pages=intval($numrows/$pagesize);//总页数 $page=$HTTP_GET_VARS['page']; if (empty($page)){ $page=1; } $offset=$pagesize*($page - 1); //计算记录偏移量 ?>       ... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-49117.html" target="_blank">kookies </a> - <a href="http://bbs.chinaunix.net/forum-27-1.html" target="_blank">PHP</a> - 2008-05-09 10:56:32 阅读(1758) 回复(4) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-559159-1-1.html" target="_blank"> 怎么样在<font color="red">mysql</font>>的命令行里面<font color="red">运行</font>一个写好的sql<font color="red">脚本</font> </a></h2> </div> <p> 怎么样在<font color="red">mysql</font>>;的命令行里面<font color="red">运行</font>一个写好的sql<font color="red">脚本</font> 谢谢 </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20153233.html" target="_blank">gaojp </a> - <a href="http://bbs.chinaunix.net/forum-17-1.html" target="_blank">MySQL</a> - 2005-06-09 17:29:16 阅读(1060) 回复(1) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-745735-1-1.html" target="_blank"> <font color="red">mysql</font> <font color="red">脚本</font> </a></h2> </div> <p> 哪位高人能不能告诉我怎样写个<font color="red">mysql</font>的<font color="red">脚本</font>?最好给个范例:P </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20402077.html" target="_blank">rsuhkoi </a> - <a href="http://bbs.chinaunix.net/forum-17-1.html" target="_blank">MySQL</a> - 2006-04-25 22:08:10 阅读(1236) 回复(0) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-1208608-1-1.html" target="_blank"> <font color="red">mysql</font> 管理:<font color="red">mysql</font> <font color="red">运行</font>权限 </a></h2> </div> <p> [color="#02368d"]<font color="red">mysql</font> 管理:<font color="red">mysql</font> <font color="red">运行</font>权限  对于一个刚安装好的 <font color="red">mysql</font>,其安全性是很差的,因为任何使用 <font color="red">mysql</font> 的用户都能使用和更改数据库的资料,因此需要为 <font color="red">mysql</font> 的 root 用户设置口令(<font color="red">mysql</font> 的 root 与 linux 的 root 是两回事,它们之间没有任何关系). 为 root 设置口令需要用到 <font color="red">mysql</font>admin 这个命令,因为我安装的 <font color="red">mysql</font> 在 /usr/local 下,因此,我到目录 /usr/local/bin 下<font color="red">运行</font>这个命令: #./<font color="red">mysql</font>admin -u root password "... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-108122.html" target="_blank">me09 </a> - <a href="http://bbs.chinaunix.net/forum-136-1.html" target="_blank">MySQL文档中心</a> - 2006-07-31 18:20:42 阅读(745) 回复(0) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-1208303-1-1.html" target="_blank"> <font color="red">mysql</font> 管理:<font color="red">mysql</font> <font color="red">运行</font>权限  </a></h2> </div> <p> 对于一个刚安装好的 <font color="red">mysql</font>,其安全性是很差的,因为任何使用 <font color="red">mysql</font> 的用户都能使用和更改数据库的资料,因此需要为 <font color="red">mysql</font> 的 root 用户设置口令(<font color="red">mysql</font> 的 root 与 linux 的 root 是两回事,它们之间没有任何关系). 为 root 设置口令需要用到 <font color="red">mysql</font>admin 这个命令,因为我安装的 <font color="red">mysql</font> 在 /usr/local 下,因此,我到目录 /usr/local/bin 下<font color="red">运行</font>这个命令: #./<font color="red">mysql</font>admin -u root password "passwd" "passwd" 是我为 root 设置的口令明文;... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-140205.html" target="_blank">leejianzhou </a> - <a href="http://bbs.chinaunix.net/forum-136-1.html" target="_blank">MySQL文档中心</a> - 2006-05-06 07:51:18 阅读(662) 回复(0) </div> </div> <div class="friendly_link"> <div class="friendly_con1"> <div class="f_link_tit">盛拓传媒:</div> <p><a href="http://www.it168.com">IT168</a> | <a href="http://www.pcpop.com">泡泡网</a> | <a href="http://www.autohome.com.cn">汽车之家</a> | <a href="http://www.che168.com">二手车之家</a> | <a href="http://www.qudao168.com">渠道168</a> | <a href="http://www.itpub.net/">ITPUB</a> | <a href="http://www.ixpub.net/">IXPUB</a> | <a href="http://www.chinaunix.net/">ChinaUnix</a> | <a href=" http://www.jimi168.com/">安卓之家</a> | <a href="http://www.app111.com/">苹果园</a> | <a href="http://www.gqt168.com/">家商城</a> | <a href="http://bbs.app111.com/">苹果论坛</a></p> <div class="clear"></div> </div> </div> <div id="footer"> <div class="dot1"><a href="http://www.bj.cyberpolice.cn/index.jsp" class="n1"></a><a href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202008062400006"></a><a href="http://ulic.baidu.com/client/clientDetailCerInfo.do?id=1602"></a></div> <p class="p"> <a href="http://www.it168.com/bottomfile/about.shtml" rel="nofollow">盛拓传媒简介</a> | <a href="http://www.it168.com/bottomfile/it168.shtml" rel="nofollow">关于IT168</a> | <a href="http://www.it168.com/bottomfile/hzhb.shtml" rel="nofollow">合作伙伴</a> | <a href="http://www.it168.com/bottomfile/ggfw.shtml" rel="nofollow">广告服务</a> | <a href="http://www.it168.com/bottomfile/sytk.shtml" rel="nofollow">使用条款</a> | <a href="http://www.it168.com/bottomfile/tgzn.shtml" rel="nofollow">投稿指南</a> | <a href="http://www.wintalent.cn:8031/wt5/sequelmedia/web/index" rel="nofollow">诚聘精英</a> | <a href="http://www.it168.com/bottomfile/lxwm.shtml" rel="nofollow">联系我们</a> | <a href="http://www.itpub.net/forum.php">ITPUB论坛</a> | <a href="http://www.it168.com/bottomfile/sitemap/sitemap.html" rel="nofollow">网站导航</a> | <a href="http://archive.it168.com/" rel="nofollow">往日回顾</a> </p> <address> 北京皓辰网域网络信息技术有限公司. 版权所有 <a href="http://www.it168.com/images/icp.jpg"><font color="#666666">京ICP证:060528号</font></a> 北京市公安局海淀分局网监中心备案编号:1101082001<br> <font color="#666666">广播电视节目制作经营许可证:编号(京)字第1149号</font> </address> <div style=" color:#666;margin-top:10px; text-align:right;">ITPUB推荐文章解答你所有技术难题</div> <div class="clear"> </div> </div> </div> <!-- 统计 START --> <script language="javascript" src="http://stat.it168.com/pv.js"></script> <script> function sendPV(){ var pvTrack = new PvTrack(); pvTrack.type = 35; // 频道类别ID pvTrack.channel = 461; // 频道ID pvTrack.pageType = 0; pvTrack.track(); } window.setTimeout("sendPV()", 1000); </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20237423-2']); _gaq.push(['_setDomainName', '.chinaunix.net']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <div style='display:none'> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0ee5e8cdc4d43389b3d1bfd76e83216b' type='text/javascript'%3E%3C/script%3E")); </script></div> <!-- END STAT PV --> <!-- <script type='text/javascript' src='http://168.it168.com/js/597.js'></script> --> <script>if(typeof(BLA)!='undefined'){BLA();}</script> </body> </html>