´ÓDOSÇл»µ½mysql£º»·¾³±äÁ¿ÉèÖõÄÎÊÌâ
ÔÚWindowsXPÖдò¿ªDOS£¬Í¨¹ýÊäÈëÃüÁî“mysql -u root -p”Çл»µ½mysqlÏ£¬Çл»Ê§°Ü£¬ÈçÏÂËùʾ£º
Microsoft Windows XP [°æ±¾ 5.1.2600]
(C) °æȨËùÓÐ 1985-2001 Microsoft Corp.
C:\>mysql -u root -p
'mysql' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò
»òÅú´¦ÀíÎļþ¡£
³öÏÖÕâÖÖ´íÎóµÄÔÒòÊÇûÓÐÔÚ»·¾³±äÁ¿PATHÖн«mysqlµÄ·¾¶Ìí¼Ó½øÈ¥¡£Èç¹ûÊÇÔÚunixƽ̨£¬¿ÉÒÔͨ¹ýPATH=XXX£»export PATHÀ´½øÐз¾¶µÄÌí¼Ó£¬ÔÚWindowsXPƽ̨Ï£¬ÐèÒª°´ÕÕÏÂÃæµÄ·½·¨À´½«mysql·¾¶Ìí¼Óµ½»·¾³±äÁ¿ÖУº
ÓÒ¼üµã»÷“ÎҵĵçÄÔ”£“ÊôÐÔ”£“¸ß¼¶”£“»·¾³±äÁ¿”£“ϵͳ±äÁ¿”£Ë«»÷“Path”£½«mysqlµÄ·¾¶“C:\Program Files\MySQL\MySQL Server 5.0\bin”Ìí¼Ó½øÈ¥£“È·¶¨”
Ìí¼ÓÍê±ÏÖ®ºó£¬ÔÙµ½DOSϽøÐвâÊÔ£º
C:\>mysql -u root -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
³É¹¦£¡
Ïà¹ØÎĵµ£º
³õ´Î°²×°·½·¨£º
1¡¢È¥¹Ù·½ÏÂÔØMYSQL 5.0¡£
¡¡¡¡2¡¢Ð޸ķÀ»ðǽµÄÉèÖã¬ÔÚÔÊÐíÀýÍâÀïÌí¼ÓеĶ˿ڣ¬Ãû×ÖΪmysql£¬¿ª·ÅµÄ¶Ë¿ÚΪTCP 3306¡£
¡¡¡¡Õâ¸ö´ó¼ÒÓ¦¸Ã¶¼»á£¬ÔÚVista¿ØÖÆÃæ°åµÄWindows·À»ðǽÀïÃ棬µã»÷“¸ü¸ÄÉèÖÔ-“ÀýÍ┣¬µã»÷“Ìí¼Ó¶Ë¿Ú”¾Í¿ÉÒÔ¡£¡¡¡¡
......
ÒÔmysql-noinstall-5.1.6(win32)ΪÀý
1>°ÑѹËõÎļþmysql-noinstall-5.1.6-alpha-win32.zip½âѹµ½Ò»¸öĿ¼Ï£¬ÔÚ»·¾³±äÁ¿ÖÐÉèÖÃMYSQL_HOME£¬°Ñ%MYSQL_HOME%\bin ¼Ó
Èëµ½ path¡£
2>´´½¨my.iniÅäÖÃÎļþ,ÄÚÈÝÈçÏ£º
[mysqld]
#ÉèÖÃbasedirÖ¸ÏòmysqlµÄ°²×°Â·¾¶
basedir=...\mysql
datadir=...\mysql\data
my.iniÎ ......
1¡¢µÇ½MySQL:
mysql -u root -p
2¡¢²é¿´Óû§ÐÅÏ¢
select user,host,password from mysql.user;
select user,host from mysql.user;
3¡¢ÉèÖÃÃÜÂë
set password for root@localhost=password('
ÔÚÕâÀïÌîÈërootÃÜÂë
');
4¡¢ÐÞ¸ÄÃÜÂë
·½·¨1£ºmysqladmin -u root -p password newpassword
·½·¨2£º ££mysql -u root ......