ubuntu MySQL°²×°Ö¸ÄÏ
°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñÆ÷ÊÇ·ñÕýÔÚÔËÐУº
sudo netstat -tap | grep mysql
µ±ÄúÔËÐиÃÃüÁîʱ£¬Äú¿ÉÒÔ¿´µ½ÀàËÆÏÂÃæµÄÐУº
tcp 0 0 localhost.localdomain:mysql *:* LISTEN -
Èç¹û·þÎñÆ÷²»ÄÜÕý³£ÔËÐУ¬Äú¿ÉÒÔͨ¹ýÏÂÁÐÃüÁîÆô¶¯Ëü£º
sudo /etc/init.d/mysql restart
½øÈëmysql
mysql -uroot -p
(ÊäÈëmysqlµÄrootÃÜÂë)
ÅäÖà MySQL µÄ¹ÜÀíÔ±ÃÜÂ룺
sudo mysqladmin -u root password newpassword
Ïà¹ØÎĵµ£º
µ±mysqlÊý¾Ý¿âΪGBK±àºÅ£¬.net³ÌÐòʹÓÃĬÈϱàÂ루UTF-8£©£¬ÏòmysqlÖвåÈëÊý¾ÝÈÝÒײúÉúÂÒÂë¡£½â¾ö°ì·¨ÊÇÔÚÁ¬½Ó×Ö·û´®¼ÓÈëCharset=gbk£º
MySqlConnection myConnection = new MySqlConnection("Database=test2;Data Source=localhost;User Id=root;Password=ikmbikmb;Charset=gbk"); ......
mysql ÃüÁîѧϰ£º
1. mysql -uroot ;
2.mysql -h ip -ubusiusr -pbusiusr newdrmdb;
3.show databases ; //ÏÔʾËùÓеÄÊý¾Ý¿â ;
4.show tables ; ......
×î½üÏëÔÚ·þÎñÆ÷ÉÏÊÔÊÔMySQL5.1µÄ·ÖÇø£¬ÓÚÊǾÍÏë×Å×°¸öMySQL5.1£¬¾¹ýÍ´¿àµÄÒ»¶Î¾Àúºó£¬ÖÕÓÚÕÒ¸öÏÂÃæ×°¸öºÜºÃµÄ½Ì³Ì£¬ÌûÉÏÀ´±¸Íü¡£
1¡¢MySQLÃâ°²×°°æ/¶þ½øÖÆ°æÈí¼þ£¬²»ÓñàÒ룬ÏÂÔصØÖ·£º
http://dev.mysql.com/downloads/
Îļþ¸ñʽ£ºMYSQL-VERSION-OS.tar.gz
2¡¢´ ......
MySQL °æ±¾£º5.0.45 phpMyAdmin°æ±¾£º2.11.3
Ê×ÏÈ¿´MySQL 5.0²Î¿¼ÊÖ²áÖйØÓÚ´´½¨´æ´¢¹ý³ÌµÄÓ﷨˵Ã÷£º
CREATE
[DEFINER = { user | CURRENT_USER }]
PROCEDURE sp_name ([proc_parameter[,...]])
[characteristic ...] r ......
1¡¢´ò¿ªMyEclipse6.6
2¡¢Ñ¡Ôñ²Ëµ¥£ºWindow/Open Perspective/MyEclipse Database Explorer£¬µã»÷OK£¬ÔÚ×ó±ß´ò¿ªDB Brower´°¿Ú¡£
3¡¢ÔÚDB Brower´°¿ÚÄÚÈÎÒâ¿Õ°×´¦»÷ÓÒ¼ü£¬Ñ¡ÔñNewÃüÁµ¯³öDatabase Driver´°¿Ú
4¡¢±¾´°¿Ú¸÷Ïî˵Ã÷£º
Driver template: MySQL Connector/J Ñ¡ÔñÇý¶¯Ä£°å
& ......