C#中调用mysql存储过程出现的问题
在root账号中,可以正常调用存储过程.
换到common_user账号时,同一存储过程名调用出现问题.
追踪调试时出现:
SELECT command denied to user 'common_user'@'localhost' for table 'proc'
搜索解决方案:
MySqlConnection myconnection = new MySqlConnection("server=localhost;user id=common_user; password=***;database=testdb; Use Procedure Bodies=false;Charset=utf8;");
关键语句是:
Use Procedure Bodies=false;
在网上搜索本句含义:
Name : Use Procedure Bodies
Default : true
Description : Setting this option to false indicates that the user connecting to the database does not have the SELECT privileges for the mysql.proc (stored procedures) table. When to set to false, Connector/NET will not rely on this information being available when the procedure is called. Because Connector/NET will be unable to determine this information, you should explicitly set the types of the all the parameters before the call and the parameters should be added to the command in the exact same order as they appear in the procedure definition. This option was added in Connector/NET 5.0.4 and Connector/NET 1.0.10.
大体意思是说:
当设置时use procedure bodies=false,存储过程的参数需要与程序里的参数顺序一致.
还未结束.
在mysql官方.给出了这样设置会有一个BUG.
http://bugs.mysql.com/bug.php?id=36694
当然这样解决的办法还是有的.可以使用ODBC连接来实现.
这里不再详细说明.
附上.NET连接mysql的连接字符串网址(比较全面的连接归类):
http://www.connectionstrings.com/mysql
相关文档:
我们可以使用XML作为数据传送、沟通的格式,Ajax客户端若要发送XML,基本上就是将XML作为字符串,在POST请求时发送,例如:
*HelloAjax.js
view plaincopy to clipboardprint?
var xmlHttp;
function createXMLHttpRequest() {
if (window.XMLHttpRequest) {   ......
数据同步问题终于解决:
转帖:A服务器: host 192.168.1.101 port 3306 B服务器: host 192.168.1.102 port 3306 1,授权用户: A服务器 mysql>grant replication slave,file on *.* to 'repl9'@'192.168.1.102' identified by '1234569'; Query OK, 0 rows affected (0.01 sec) mysql> flush privileges; Qu ......
sqlserver中:
1 /*
2 1 * Description:对数据表进行行列转换
3 2 * Author:llf
4 3 * 调用说明:exec SP_RowChangeCol '学生成绩表','姓名','课程','分数','desc',0,0,'where 年级=''一年级'''
& ......
刚开始操作数据库时我一般是不使用什么gui工具的,我是直接使用cmd下操作的,感觉用起来也挺不错的。
最近看到有gui工具那也不错啊,就下来使用一下,我喜欢下的是压缩包免安装的,这样感觉比较舒服啊
打开查询工具是竟然出错了,不过能正常使用的,当时也没有注意,今天特意的看了一下
应该是mysqlqb_functions.xml加载 ......
原文转自http://www.mysqlsystems.com/2009/04/mysql_sanbox.html
一群海豚在属于自己的海滩上自由的玩耍,尽管只是一个方盒的大小,但是设备一样
的齐全,同样可以玩的很开心,这就是我今天要说的——MySQL Sandbox2.0,3.0也将要推出。
MySQL
Sandbox是一个非常简单快捷部署MySQL技术的一个工具套件,它可 ......