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

MYSQLÊý¾Ý¿âʵÓÃѧϰ×ÊÁÏÖ®³£ÓÃÃüÁºÏ

 MysqlÊý¾Ý¿âÊÇÒ»¸ö¶àÓû§£¬¶àÏ̵߳ĹØϵÐÍÊý¾Ý¿â£¬ÊÇÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄÓ¦ÓóÌÐò¡£ËüÊǶԸöÈËÓû§ºÍÉÌÒµÓû§ÊÇÃâ·ÑµÄ.
MysqlÊý¾Ý¿â¾ßÓÐÒÔÏÂÓŵ㣺
1.ͬʱ·ÃÎÊÊý¾Ý¿âµÄÓû§µÄÊýÁ¿²»ÊÜÏÞÖÆ
2.¿ÉÒÔ±£´æ³¬¹ý5ǧÍòÌõµÄ¼Ç¼
3.ÊÇÄ¿Ç°Êг¡ÉÏÏÖÓÐÊý¾Ý¿â²úÆ·ÖÐÔËÐÐËÙ¶È×î¿ìµÄÊý¾Ý¿âϵͳ
4.Óû§È¨ÏÞÉèÖüòµ¥¡¢ÓÐЧ¡£
MysqlÊý¾Ý¿â³£ÓÃÃüÁ
Æô¶¯MysqlÊý¾Ý¿â
C:>cd Mysql5.0bin
C:Mysql5.0bin>mysqld –install °²×°Mysql·þÎñ
C:Mysql5.0bin>net start mysql Æô¶¯Mysql·þÎñ
ÇëÇóµÄ·þÎñÒѾ­Æô¶¯¡£
Á¬½Ómysql
Óû§ÐèÒªÌṩMysqlµÄÓû§ÃûºÍÃÜÂëÀ´Á¬½Ó·þÎñÆ÷£¬Èç¹û·þÎñÆ÷²»ÊÇÔÚ±¾»ú£¬Ôò»¹ÐèÒªÒ»¸öÖ÷»úÃû»òIPÀ´Ö¸¶¨·þÎñÆ÷µÄλÖá£
C:Mysql5.0bin>mysql -h localhost -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 6 to server version: 5.0.18-nt
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
ʹÓÃÒ»Ìõ¼òµ¥µÄ²éѯÓï¾ä
mysql> select version(),current_date;
mysql> select version();select now();
н¨»òɾ³ýÒ»¸öÊý¾Ý¿â
Mysql>create database mydb;
Mysql> drop database mydb;
´ò¿ªµÄÊý¾Ý¿âµÄÃüÁî
mysql> use mysql
Database changed
²é¿´Êý¾Ý¿âµÄÃüÁî
mysql> show databases;
²é¿´Êý¾Ý±íµÄÏêϸ½á¹¹
mysql> desc func;
н¨Êý¾Ý¿â
mysql> create database school;
Query OK, 1 row affected (0.00 sec)
н¨±í
mysql> create table user01(
-> id varchar(20) NOT NULL,
-> userName varchar(10) NOT NULL,
-> age int(11) default'0',
-> sex char(2) NOT NULL default'm',
-> PRIMARY KEY (id)
-> )TYPE=InnoDB;
Query OK, 0 rows affected, 1 warning (0.02 sec)mysql>desc student;
²åÈëºÍɾ³ý±íÖеÄÊý¾Ý
Create table student(stuName varchar(20),age varchar(20),id varchar(20),set0 char(1));
²åÈë
mysql> insert into student(id,stuName) values('1','tomcat');
Query OK, 1 row affected (0.00 sec)
ɾ³ý
mysql> delete from student where id='1';
Query OK, 1 row affected (0.01 sec)
ɾ³ý±íÖÐËùÓÐÊý¾Ý
mysql> truncate table student


Ïà¹ØÎĵµ£º

MySQL 5.0.16 ÂÒÂëÎÊÌâ´¦Àí°ì·¨


1 ÉèÖÃphpMyAdmin
Language:Chinese simplified (zh-utf-8)
MySQL ×Ö·û¼¯£ºUTF-8 Unicode (utf8)
MySQL Á¬½ÓУ¶Ô gbk_chinese_ci
2 ´´½¨Êý¾Ý¿âʱ
ÕûÀíÉèÖÃ³É gbk_chinese_ci
3 ÓÃSQL½¨Á¢±íÖÐ
ENGINE=MyISAM DEFAULT CHARSET=gbk;
ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=40 ;
4 ¼ì²é±í½á¹¹ÖÐ
varcha ......

MYSQLµÄһЩС¼Ç

ÏÂÎç¿´ÁËÒ»¶ÎPHP100µÄÊÓƵ¡£
Ò²ËãÓеãÊÕ»ñ¡£
ÀïÃæµÄÒ»¶Î×ÔдµÄfindallµÄSQLº¯Êý£º
public function findall($table) {
$this->query("SELECT * from $table");
}

Ô­À´Ö»ÊÇÕâô¼òµ¥£¬¸Õ»¹ÔÚ˼¿¼¡£
ʹÓÃÁËTAB¼üÉÏÃæµÄ¶ÙºÅÀ´ÐÞÊÎMYSQLÀïµÄ×Ö¶ÎÃû£¬È磺
UPDATE tablename SET `fieldname`='values' wh ......

MySQLÖÐʹÓô洢¹ý³Ì(ÕûÀí)

 MySQLÖÐʹÓô洢¹ý³Ì
ʹÓÃCallableStatementsÖ´Ðд洢¹ý³Ì
mysql°æ±¾:5.0
Connector/JµÄ°æ±¾:3.1.1ÒÔÉÏ(java.sql.CallableStatement½Ó¿ÚÒÑÍêȫʵÏÖ,³ýÁËgetParameterMetaData()·½·¨)
MySQLµÄ´æ´¢¹ý³ÌÓï·¨ÔÚMySQL²Î¿¼ÊÖ²áµÄ"´æ´¢¹ý³ÌºÍº¯Êý"Ò»ÕÂ.
http://www.mysql.com/doc/en/Stored_Procedures.html
ÏÂÃæÊÇÒ»¸ ......

PHPnow = Apache + PHP + MySQL + phpMyAdmin

 
PHPnow ÊÇʲô?
Win32 ÏÂÂÌÉ«Ãâ·ÑµÄ Apache + PHP + MySQL »·¾³Ì×¼þ°ü¡£
¼òÒ×°²×°¡¢¿ìËٴ֧³ÖÐéÄâÖ÷»úµÄ PHP »·¾³¡£¸½´ø PnCp.cmd ¿ØÖÆÃæ°å£¬°ïÖúÄã¿ìËÙÅäÖÃÄãµÄÌ×¼þ£¬Ê¹Ó÷dz£·½±ã¡£
PHPnow ÊÇÂÌÉ«µÄ£¬½âѹºóÖ´ÐÐ Init.cmd ³õʼ»¯£¬¼´¿ÉµÃµ½Ò»¸ö PHP + MySQL »·¾³¡£
È»ºó¾Í¿ÉÒÔÖ±½Ó°²×° Discuz!, PHPWind, ......

11 advanced MySQL questions

 

Explain MySQL architecture
. - The front layer
takes care of network connections and security authentications, the
middle layer does the SQL query parsing, and then the query is handled
off to the storage engine. A storage engine could be either a default
one supp ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ