mysqlÃÜÂë
MYSQL ÐÞ¸ÄrootÃÜÂëÃüÁî
cmdÏÂÇл»µ½ mysql °²×°Ä¿Â¼
Àý
d:/mysql/bin
ǰÌ᣺mysqlÓû§rootÃÜÂëΪ¿Õ.
ÊäÈë mysql -u root mysql
mysql> ״̬ÏÂÊäÈë update user set password=password('ÐÂÃÜÂë') where user='root';
»ØÏÔ
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0
mysql> ״̬ÏÂÊäÈë FLUSH PRIVILEGES;
»ØÏÔ
Query OK, 0 rows affected (0.00 sec)
mysql> ״̬ÏÂÊäÈë quit
Í˳ö sql
×¢Òâÿ¸öÃüÁîºó¶¼Òª¼ÓÉÏÒ»¸ö·ÖºÅ ";"
mysql ²Å¿ªÊ¼Ö´ÐиÃÐÐÃüÁî
¶øµÚ¶þ¸öÖ¸Áî»áÈÃÒÑÔØÈë¼ÇÒäÌåµÄ mysql ϵͳ×ÊÁÏ¿â¸üÐÂ
ÖØÆð mysql .
ÔÚ¸üРroot ÃÜÂëáᣬÈÕááÒªÓë MySQL Á¬Ïߵķ½·¨Îª£º
mysql -uroot -pÐÂÃÜÂë
==================================================
Íü¼Çmysql µÄroot ÃÜÂ룺
ÏÈÈ·ÈÏÒѾɱµômysqld ½ø³ÌÁË£¬È»ºóÖ´ÐÐÕâ¸ö
/usr/bin/safe_mysqld --skip-grant-tables &
ÔÙÕâÑùµÇ¼
mysql -h 192.168.1.2 -u root
ÉϱߵÄ192.168.1.2 ÊÇcloud µÄmysqld ÔËÐлúÆ÷£¬Äã»»³É×Ô¼ºµÄ£¬ÕâÑùµÇ¼ÉÏ
È¥£¬¾Í¿ÉÒÔÐÞ¸ÄÃÜÂëÁË¡£
ÐÞ¸ÄÃÜÂë
1.mysql -h hostname –u root ÃüÁîµÇ¼µ½mysqld server ÓÃgrant ÃüÁî¸Ä±ä¿ÚÁî:
Grant all on *.* to root indentified by "111111"
2. mysqladmin -u Óû§Ãû-p ¾ÉÃÜÂëpassword ÐÂÃÜÂë
Àý1£º¸øroot ¼Ó¸öÃÜÂëab12¡£Ê×ÏÈÔÚDOS ϽøÈëĿ¼mysqlbin£¬È»ºó¼üÈë
ÒÔÏÂÃüÁî
mysqladmin -uroot password ab12
×¢£ºÒòΪ¿ªÊ¼Ê±root ûÓÐÃÜÂ룬ËùÒÔ-p ¾ÉÃÜÂëÒ»Ïî¾Í¿ÉÒÔÊ¡ÂÔÁË¡£
2¡¢Àý2£ºÔÙ½«root µÄÃÜÂë¸ÄΪdjg345¡£
mysqladmin –u root -pab12 password djg345 (×¢Òâ-p ²»ÒªºÍºóÃæµÄÃÜÂë·Ö
¿ªÐ´£¬ÒªÐ´ÔÚÒ»Æð)
3.
use mysql; update user set password =password('yourpass') where user='r
oot'
4. ÔØÈëȨÏÞ±í£º `mysqladmin -h hostname flush-privileges' £¬»òÕßʹ
ÓÃSQL ÃüÁî`FLUSH PRIVILEGES'¡££¨µ±È»£¬ÔÚÕâÀÄãÒ²¿ÉÒÔÖØÆômysqld¡££©
mysql µÄ½¨¿â£¬Ìí¼ÓÊý¾Ý·½·¨£º
mysqi –u root
mysql>create database ttt;
mysql>source 1.txt
mysql>load data local infile "2.txt" into table board;
1.txt ÄÚÈÝ:
CREATE TABLE board (
boardid int(11) NOT NULL auto_increment,
boardname char(255),
PRIMARY KEY (boardid)
);
Ïà¹ØÎĵµ£º
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@localhost]# mysql -u root -p
Enter password:
ERROR 2002 (H ......
MS SQL ÖеÄIsNull()º¯Êý£º
IsNull ( check_expression , replacement_expression )
check_expression: ¿ÉÒÔÊÇÈκÎÀàÐÍ,½«Òª¼ì²éµÄ±í´ïʽ ²»Îª¿Õ£¬·µ»ØËü
replacement_expression: ÀàÐͱØÐëºÍcheck_expressionÏàͬ£¬check_expressionΪnull£¬·µ»ØËü
Õâ¸öº¯ÊýµÄ×÷ÓþÍÊÇ£ºÅжÏcheck_expressionÊÇ·ñΪ¿Õ£¬Îª¿Õ¾Í·µ» ......
½â¾ö°ì·¨£ºÔÚÁ¬½Ó×Ö·û´®ÖÐ˵Ã÷Á¬½Ó×Ö·ûµÄÊôÐÔ£¬È磺
<add name="server_mysql" connectionString="server=127.0.0.1;user id=root; password=123; database=baiduemail; pooling=false;charset=gbk"/>
»òÕßÊÇ;charset=gb2312
ÁíÍâ×¢Ò⣺ÔÚ´´½¨mysqlÊý¾Ý¿âµÄ±íµÄʱºòÑ¡Ôñ±àÂ뼯gbk ......
Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§Ãûǰ¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëǰ±ØÐëûÓпոñ£¬·ñÔòÈÃÄãÖØÐÂÊäÈëÃÜÂë.
Èç¹û ......