MYSQL ±¸Íü¼
MySQL client programs:
mysql
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”.
mysqladmin
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”.
mysqlcheck
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance and Repair Program”.
mysqldump
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”.
mysqlimport
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”.
mysqlshow
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”.
mysqlslap
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”.
Ïà¹ØÎĵµ£º
Transact_SQLСÊÖ²á
*******************Transact_SQL********************
--Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT & ......
Ê×Òª²½Öè(Ò»°ã¿ÉÊ¡ÂÔ):
¿ªÆômysql·þÎñ(ĬÈÏÊÇ¿ª»úʱ¾Í×Ô¶¯ÔËÐÐÁË):
¿ØÖÆÃæ°å
-->¹ÜÀí¹¤¾ß-->·þÎñ,ÔÚÀïÃæÕÒµ½Ãû³ÆΪmysqlµÄÏî,Ë«»÷¾Í¿É¿´ËüµÄ·þÎñ״̬ÊÇÆô¶¯»¹ÊÇÍ£Ö¹,°ÑËüÉèΪÆô¶¯
Á¬½Ómysql:
ÔÚÃüÁîÐÐÏÂÊäÈë mysql -h
localhost -u root -p»Ø³µ,È»ºóÊäÈëÃÜÂë¼´¿É;»òÖ±½ÓÔËÐÐmysql×Ô´øµÄÁ¬½Ó¹¤¾ß,È»ºóÊäÈëÃÜÂë¼ ......
PHPÊÖ²áÉÏÌṩÁËÒÔÏÂһЩÖ÷ÒªµÄmysqlÊý¾Ý¿âµÄÖ§³Öº¯Êý£º
mysql_affected_rows -- È¡µÃÇ°Ò»´Î MySQL ²Ù×÷ËùÓ°ÏìµÄ¼Ç¼ÐÐÊý
mysql_change_user -- ¸Ä±ä»î¶¯Á¬½ÓÖеǼµÄÓû§
mysql_client_encoding -- ·µ»Ø×Ö·û¼¯µÄÃû³Æ
mysql_close -- ¹Ø±Õ MySQL Á¬½Ó
mysql_connect -- ´ò¿ªÒ»¸öµ½ MySQL ·þÎñÆ÷µÄÁ¬½Ó
mysql_c ......
´Ó±¾Æª²©ÎÄ¿ªÊ¼£¬ÎÒÃǾÍÒªÉîÈëµ½PHPµÄÓ¦Óõ±ÖÐÈ¥ÁË¡£PHPµÄÊý¾Ý¿âÓ¦ÓÃÊÇÖØÖÐÖ®ÖØ£¬±ØÐëÕÆÎÕ¡£Ñ¡ÔñʲôÑùµÄÊý¾Ý¿âÄØ£¬µ±È»ÊÇÎÒÃǵÄMySQLÀ²£¬Ã»ÓÐÈË»áȥʹÓÃÄÇЩÅÓ´ó¡¢µÍЧ¶øÓÖ°º¹óµÄÉÌÒµÊý¾Ý¿âÀ´¹¹½¨PHPÓ¦Óðɡ£
1 MySQLÊý¾Ý¿âµÄ°²×°
¹ýÈ¥£¬°²×°Ò»¸öMySQLÊý¾Ý¿â²¢ÇÒÒªÆô¶¯ÆðÀ´ºÜ·ÑÊ£¬ÌرðÊÇÔÚLinuxÕâÑùµÄ¿ª·¢»·¾³Ï£¬ÐèÒª¸ ......