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
Ïà¹ØÎĵµ£º
PHP³ÌÐòºÍMySqlÊý¾ÝÂÒÂëÎÊÌâÔÒò¼°½â¾ö
ÂÒÂëÎÊÌâ¼òµ¥Ëµ¾ÍÊÇÊý¾Ý¿âдÈë¶ÁÈ¡£¬ÍøÒ³Îļþ£¬ÍøÒ³ÏÔʾʱ¼¸¸ö»·½ÚµÄ±àÂë²»Ò»ÖÂÔì³ÉµÄ¡£
ÂÒÂëÎÊÌâ
дÈëʱ£ºÒ³ÃæÌáȡдÈëÊý¾Ý±àÂëºÍдÈëÊý¾Ý¿âʱ±àÂë²»Ò»ÖÂ
¶Áȡʱ£º¶ÁÈ¡ºóËùÓñàÂëÓëÊý¾Ý¿âдÈëʱ²»Ò»ÖÂ
ÏÔʾʱ£º±àÂëÓëÊý¾Ý¿â¶ÁÈ¡ºóµÄÊý¾Ý²»Ò»ÖÂ
ºÜÏÔȻֻÓÐÈýÕ߶¼Í³Ò»²ÅÐУ ......
PBÁ¬½ÓMySQLÊý¾Ý¿â
È¥mysqlµÄ¹Ù·½ÍøÕ¾ÏÂÔØodbc connector(http://dev.mysql.com/downloads/connector/odbc/)
ÏÂÔصÄÊÇmysql-connector-odbc-noinstall-5.1.6-win32.zip
½âѹºóÖ±½ÓÔËÐÐÎļþ¼ÐÖÐµÄ Install.bat Åú´¦ÀíÎļþ
mysql-connectorÓкü¸ÖÖ£¬Ñ¡ÔñÒ»¸ö×Ô¼ºÏ²»¶µÄ¼´¿É¡£
ÔÚxpÖдò¿ªODBCÊý¾ÝÔ´¹ÜÀíÆ÷£¨¿ØÖ ......
sqlserverÖУº
1 /*
2 1 * Description:¶ÔÊý¾Ý±í½øÐÐÐÐÁÐת»»
3 2 * Author:llf
4 3 * µ÷ÓÃ˵Ã÷£ºexec SP_RowChangeCol 'ѧÉú³É¼¨±í','ÐÕÃû','¿Î³Ì','·ÖÊý','desc',0,0,'where Ä꼶=''Ò»Ä꼶'''
& ......
¸Õ¿ªÊ¼²Ù×÷Êý¾Ý¿âʱÎÒÒ»°ãÊDz»Ê¹ÓÃʲôgui¹¤¾ßµÄ£¬ÎÒÊÇÖ±½ÓʹÓÃcmdϲÙ×÷µÄ£¬¸Ð¾õÓÃÆðÀ´Ò²Í¦²»´íµÄ¡£
×î½ü¿´µ½ÓÐgui¹¤¾ßÄÇÒ²²»´í°¡£¬¾ÍÏÂÀ´Ê¹ÓÃһϣ¬ÎÒϲ»¶ÏµÄÊÇѹËõ°üÃâ°²×°µÄ£¬ÕâÑù¸Ð¾õ±È½ÏÊæ·þ°¡
´ò¿ª²éѯ¹¤¾ßÊǾ¹È»³ö´íÁË£¬²»¹ýÄÜÕý³£Ê¹Óõģ¬µ±Ê±Ò²Ã»ÓÐ×¢Ò⣬½ñÌìÌØÒâµÄ¿´ÁËÒ»ÏÂ
Ó¦¸ÃÊÇmysqlqb_functions.xml¼ÓÔØ ......