Mysql³õʼ»¯rootÃÜÂëºÍÔÊÐíÔ¶³Ì·ÃÎÊ
Mysql³õʼ»¯rootÃÜÂëºÍÔÊÐíÔ¶³Ì·ÃÎÊ
mysqlĬÈÏrootÓû§Ã»ÓÐÃÜÂ룬ÊäÈëmysql –u root ½øÈëmysql
1¡¢³õʼ»¯rootÃÜÂë
½øÈëmysqlÊý¾Ý¿â
1
mysql>update user set password=PASSWORD(‘123456’) where User='root';
2¡¢ÔÊÐímysqlÔ¶³Ì·ÃÎÊ,¿ÉÒÔʹÓÃÒÔÏÂÈýÖÖ·½Ê½:
a¡¢¸Ä±í¡£
1
mysql -u root –p
2
mysql>use mysql;
3
mysql>update user set host = '%' where user = 'root';
4
mysql>select host, user from user;
b¡¢ÊÚȨ¡£
ÀýÈ磬ÄãÏërootʹÓÃ123456´ÓÈκÎÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷¡£
1
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
Èç¹ûÄãÏëÔÊÐíÓû§jack´ÓipΪ10.10.50.127µÄÖ÷»úÁ¬½Óµ½mysql·þÎñÆ÷£¬²¢Ê¹ÓÃ654321×÷ΪÃÜÂë
1
mysql>GRANT ALL PRIVILEGES ON *.* TO 'jack'@’10.10.50.127’ IDENTIFIED BY '654321' WITH GRANT OPTION;
2
mysql>FLUSH RIVILEGES
c:ÔÚ°²×°mysqlµÄ»úÆ÷ÉÏÔËÐУº
1
//½øÈëMySQL·þÎñÆ÷
2
d:\mysql\bin\>mysql -h localhost -u root
3
//¸³ÓèÈκÎÖ÷»ú·ÃÎÊÊý¾ÝµÄȨÏÞ
4
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION
5
//ʹÐÞ¸ÄÉúЧ
6
mysql>FLUSH PRIVILEGES
7
//Í˳öMySQL·þÎñÆ÷
8
mysql>EXIT
Ïà¹ØÎĵµ£º
½â¾ömysql“Access denied for user
ÎÒµÄϵͳÊÇubuntu6.06£¬×î½üÐÂ×°ºÃµÄmysqlÔÚ½øÈëmysql¹¤¾ßʱ£¬×ÜÊÇÓдíÎóÌáʾ:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ʹÓÃÍøÉϽéÉܵķ½·¨ÐÞ¸ÄrootÓû§µÄÃÜÂ룺
# mysqladmin -uroot -p p ......
ÏÂÔØ ADO.NET Driver for MySQLMySql.Data.dll
°²×°ºó£¬ÔÚ°²×°Ä¿Â¼ÏÂÃæÕÒµ½Assemblies
Îļþ¼Ð£¬ÕÒµ½ MySql.Data.dll
(´ËÎļþÊÇ.Net·ÃÎÊMySQLÊý¾Ý¿âµÄÒ»¸öÇý¶¯£¬ÍêÈ«ADO.NETÊý¾Ý·ÃÎÊģʽ£¬ÓÉMySQL¹Ù·½Ìṩ£¬Óжà¸ö°æ±¾¿ÉÑ¡Ôñ¡£)
ѧϰµÄÒ»¸öÁ´½Ó£ºhttp://www.cnblogs.com/wcfgroup/articles/1242256.html
´´½¨Ò»¸ö ......
1.reverse(str)º¯Êý: ·µ»Øµßµ¹×Ö·û˳ÐòµÄ×Ö·û´®str, ¸Ãº¯Êý¶Ô¶à×Ö½Ú¿É¿¿µÄ.
mysql> select * from user;
+----+------------------+
| id | name |
+----+------------------+
| 1 | test &nbs ......
Èç¹û´ó¼ÒÓÐÒìÒ飬¿ÉÒÔÔÚºóÃæ²¹³ä¡£ÎÒ»áËæʱ¸üеġ£
ÏÖÔÚ´ó¸ÅÁгöÈçÏÂ:(Íû¸÷λ²¹³ä)
1.Êý¾Ý¿âµÄÉè¼Æ
¾¡Á¿°ÑÊý¾Ý¿âÉè¼ÆµÄ¸üСµÄÕ¼´ÅÅÌ¿Õ¼ä.
1).¾¡¿ÉÄÜʹÓøüСµÄÕûÊýÀàÐÍ.(mediumint¾Í±Èint¸üºÏÊÊ).
2).¾¡¿ÉÄܵĶ¨Òå×Ö¶ÎΪnot null,³ý·ÇÕâ¸ö×Ö¶ÎÐèÒªnull.£¨Õâ¸ö¹æÔòÖ»ÊʺÏ×Ö¶ÎΪKEYµÄÇéÐΣ©
3).Èç¹ûûÓÐÓõ½±ä³¤×Ö¶ÎµÄ ......
×î½üÒµÎñ·ÃÎÊÁ¿±È½Ï´ó£¬Êý¾Ýͳ¼ÆÀàµÄ²Ù×÷¶¼Çл»µ½mysqlµÄ±¸»úÉÏÈ¥ÁË£¬±¸»úµÄ¶Á²Ù×÷²»»áÓ°ÏìÖ÷¡¢±¸Ö®¼äµÄÈȱ¸µÄ
ÏÂÃæÁÐһϾßÌåµÄÔÀí£º
ÒªÏëÓúÃÒ»¸öϵͳ£¬Àí½âÆäʵÏÖÔÀíÊǷdz£ÖØÒªµÄÊÂÇ飬ֻÓÐÀí½âÁËÆäʵÏÖÔÀí£¬ÎÒÃDzÅÄܹ»Ñﳤ±Ü¶Ì£¬ºÏÀíµÄÀûÓ㬲ÅÄܹ»´î½¨³ö×îÊʺÏÎÒÃÇ×Ô¼ºÓ¦Óû·¾³µÄϵͳ£¬²ÅÄܹ»ÔÚϵͳʵʩ֮ºó¸üºÃµ ......