Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MySQL AdministratorÎÞ·¨Á¬½Ó·þÎñÆ÷µÄ½â¾ö·½·¨

   ĬÈÏÇé¿öÏÂLinuxÄÚµÄmysqlÊý¾Ý¿âmysql.user±íÄÚµÄÓû§È¨ÏÞÖ»ÊǶÔlocalhost¼´±¾»ú²ÅÄܵǽ¡£ËùÒÔÐèÒª¸ü¸ÄȨÏÞ£¬·ñÔòÎÞ·¨Ê¹ÓÃMysql AdministratorÁ¬½Ó·þÎñÆ÷£¬»á·¢ÉúÈçÏÂËùʾµÄ´íÎó£º
      MySQL Administrator 1.1.9ÅäÖÃ,Á¬½ÓmysqlÊý¾Ý¿â
      Could not connect to the specified instance
      MySQL Error Number 1130
      Host '192.168.1.51' is not allowed to connect to this MySQL server
      if you want to check the net connection , please click the ping buttion
     
   ½â¾öµÄ·½·¨£¬Ê×ÏȰ´ÕÕÈçϵķ½Ê½È·ÈÏ·þÎñÆ÷ÉϵÄuser±íÖеÄȨÏÞÉèÖã¬Ö´ÐÐÃüÁ
root#mysql -h localhost-u mysql -p 
Enter password:    ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.0.20a-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;   (´ËDB´æ·ÅMySQLµÄ¸÷ÖÖÅäÖÃÐÅÏ¢)
Database changed
mysql> select host,user from user; (²é¿´Óû§µÄȨÏÞÇé¿ö)
+-------------+-------+
| host            | user    |
+-------------+-------+
| localhost      |           |
| localhost      | root   |
| localhost      |           |
| localhost      | mysql |
+-------------+-------+
6 rows in set (0.02 sec)
 
    ÓÉ´Ë¿ÉÒÔ¿´³ö£¬Ä¿Ç°Ö»ÄÜÒÔlocalhostµÄÖ÷»ú·½Ê½·ÃÎÊ¡£½â¾ö·½·¨¾ÍÊÇÐÞ¸ÄȨÏÞ£¬Ö´ÐÐÈçÏÂÃüÁ
mysql> Grant all privileges on *.* to 'root'@'%' identified by ‘password’ with grant option;
    ÏàÓ¦²ÎÊýµÄ½âÊÍÈçÏ£º
 all privileges ÊÇÖ


Ïà¹ØÎĵµ£º

mysql Íü¼ÇROOTÃÜÂëµÄ¼òµ¥½â¾ö·½°¸

1.Í£µômysqld
  service mysqld stop
2.ÖØÆômysqld£¬Ö¸¶¨²ÎÊý
  service mysqld start --skip-networking --skip-grant-tables
  »òÕß
  /opt/mysql/bin/mysqld_safe --skip-networking --skip-grant-tables &
  /opt/mysql/ÊÇÎÒµÄMYSQL°²×°Â·¾¶
  skip-grant-tables:Á¬½ÓÊ±Ìø¹ýÊ ......

ÓÉMYSQL×¢Èë×ܽá³öÀ´µÄ¡£

×î½üÁ˽âÁËÒ»ÏÂMYSQL×¢È룬Ҳʵ¼Ê²Ù×÷ÁËһϣ¬È·Êµ·¢ÏÖÁËËûµÄÍþÁ¦¡£
Ò»¸ö×¢Èë©¶´¿ÉÒÔÈÃÈËÖ±½ÓÄõ½·þÎñÆ÷ȨÏÞ¡£
×ܽáһϣº
1£¬Ä¿Â¼µÄȨÏÞ²»ÄÜÌ«¸ß£¬²»È»±ðÈËÄÜÍùÀïдÎļþ£¬ÒÔǰÓÃ0777ÕæÊÇÌ«ÓÞ´ÀÁË¡£
2£¬Ñϸñ¹ýÂËÊý¾Ý£¬ÕûÐÎÒ»ÂÉתint»òÓÃmysql_escape_string
3£¬ÉèÖúÏÀíµÄÊý¾Ý¿âȨÏÞ£¬²»ÒªÓÃROOT,²»È»»áËÀµÃºÜ²Ò¡£
4 ......

MySQLÊý¾Ý¿âÏê½â

´Ó±¾Æª²©ÎÄ¿ªÊ¼£¬ÎÒÃǾÍÒªÉîÈëµ½PHPµÄÓ¦Óõ±ÖÐÈ¥ÁË¡£PHPµÄÊý¾Ý¿âÓ¦ÓÃÊÇÖØÖÐÖ®ÖØ£¬±ØÐëÕÆÎÕ¡£Ñ¡ÔñʲôÑùµÄÊý¾Ý¿âÄØ£¬µ±È»ÊÇÎÒÃǵÄMySQLÀ²£¬Ã»ÓÐÈË»áȥʹÓÃÄÇЩÅÓ´ó¡¢µÍЧ¶øÓÖ°º¹óµÄÉÌÒµÊý¾Ý¿âÀ´¹¹½¨PHPÓ¦Óðɡ£
1 MySQLÊý¾Ý¿âµÄ°²×°
¹ýÈ¥£¬°²×°Ò»¸öMySQLÊý¾Ý¿â²¢ÇÒÒªÆô¶¯ÆðÀ´ºÜ·ÑÊ£¬ÌرðÊÇÔÚLinuxÕâÑùµÄ¿ª·¢»·¾³Ï£¬ÐèÒª¸ ......

MySql´´½¨º¯Êý

Ê×ÏÈÐèÒª²é¿´Ò»Ï´´½¨º¯ÊýµÄ¹¦ÄÜÊÇ·ñ¿ªÆô£º
X:\proper\mysql\bin>mysql -h localhost -u root -p
Enter password: **********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.22-community-nt-log
Type 'help;' or '\h' for help. Type ' ......

MySQLµÄ³£ÓòÙ×÷½éÉÜ

   ×¢Ò⣺MySQLÖÐÿ¸öÃüÁîºó¶¼ÒªÒԷֺţ»½áβ¡£
£¨1£©ÏÔʾÊý¾Ý¿â
mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.04 sec)
   Mysql¸Õ°²×°ÍêÓÐÁ½¸öÊý¾Ý¿â£ºmysqlºÍtest¡£ÆäÖУ¬mysql¿â·Ç³£ÖØÒª£¬ËüÀïÃæÓÐMyS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ