mysqlÍü¼ÇrootÃÜÂëµÄ½â¾ö
mysqlÍü¼ÇrootÃÜÂëµÄ½â¾ö
Ò». MySQLÃÜÂëµÄ»Ö¸´·½·¨Ö®Ò»
Èç¹ûÍü¼ÇÁËMySQLµÄrootÃÜÂ룬¿ÉÒÔÓÃÒÔÏ·½·¨ÖØÐÂÉèÖãº
1. KILLµôϵͳÀïµÄMySQL½ø³Ì£»
killall -TERM mysqld
2. ÓÃÒÔÏÂÃüÁîÆô¶¯MySQL£¬ÒÔ²»¼ì²éȨÏ޵ķ½Ê½Æô¶¯£»
safe_mysqld --skip-grant-tables &
3. È»ºóÓÿÕÃÜÂ뷽ʽʹÓÃrootÓû§µÇ¼ MySQL£»
mysql -u root
4. ÐÞ¸ÄrootÓû§µÄÃÜÂ룻
mysql> update mysql.user set password=PASSWORD('ÐÂÃÜÂë') where User='root';
mysql> flush privileges;
mysql> quit
ÖØÐÂÆô¶¯MySQL£¬¾Í¿ÉÒÔʹÓÃÐÂÃÜÂëµÇ¼ÁË¡£
¶þ. MySQLÃÜÂëµÄ»Ö¸´·½·¨¶þ
ÓпÉÄÜÄãµÄϵͳûÓÐ safe_mysqld ³ÌÐò(±ÈÈçÎÒÏÖÔÚÓÃµÄ ubuntu²Ù×÷ϵͳ, apt-get°²×°µÄmysql) , ÏÂÃæ·½·¨¿ÉÒÔ»Ö¸´
1. Í£Ö¹mysqld£»
sudo /etc/init.d/mysql stop
(Äú¿ÉÄÜÓÐÆäËüµÄ·½·¨,×Üֹ֮ͣmysqldµÄÔËÐоͿÉÒÔÁË)
2. ÓÃÒÔÏÂÃüÁîÆô¶¯MySQL£¬ÒÔ²»¼ì²éȨÏ޵ķ½Ê½Æô¶¯£»
mysqld --skip-grant-tables &
3. È»ºóÓÿÕÃÜÂ뷽ʽʹÓÃrootÓû§µÇ¼ MySQL£»
mysql -u root
4. ÐÞ¸ÄrootÓû§µÄÃÜÂ룻
mysql> update mysql.user set password=PASSWORD('newpassword') where User='root';
mysql> flush privileges;
mysql> quit
ÖØÐÂÆô¶¯MySQL
/etc/init.d/mysql restart
¾Í¿ÉÒÔʹÓÃÐÂÃÜÂë newpassword µÇ¼ÁË¡£
Ïà¹ØÎĵµ£º
´´½¨µÄһЩ±í»á³öÏÖÕâÑùµÄÎÊÌ⣺ӢÎIJåÈëµ½±íÖÐûÓÐÈκÎÎÊÌâ¡£µ«ÊDzåÈëÖÐÎĵÄʱºò¾Í³öÏÖ Data truncation: Data too long for column 'name' at row 1 ÀàËÆµÄÎÊÌâ¡£
mysqlÄܰÑÓ¢ÎÄ×ֶβåÈçÊý¾Ý¿âÁË¡¡µ±ÎÒÊäÈëÖÐÎÄʱËû¾Í³öÏÖ×Ö¶ÎData truncation: Data too long for column 'name' at row 1
ÎÒʹÓÃÅóÓѵÄÕâ¸ö·½·¨£º(1)ÐÞ¸ ......
1.apacheµÄ°²×°
apache±¾À´ÊÇÏëÓñàÒë°²×°µÄ£¬µ«ÊÇÆädevelÐèÒªÒÀÀµÒ»Ð©ÆäËûµÄ°ü£¬°²×°ÆðÀ´Ì«Âé·³£¬ËùÒÔ¾ö¶¨Ê¹Óñ¾µØyumÔ´°²×°£»ÔÚrhel5u3ÉÏ£¬Ö±½Ó yum install httpd
yum install httpd-devel
ÕâÑù»áÓÐhttpd-develµÄһЩÒÀÀµ°üÒ»²¢°²×°ÁË£»
rpm°²×°µÄhttpdÓÐÈçϼ¸¸öÖØÒªµÄĿ¼£º
1)/etc/ht ......
PHP·ÃÎÊMySQLÊý¾Ý¿âº¯Êý¼ò½é
1. ½øÐÐÊý¾Ý¿âÁ¬½Ó
Á¬½ÓÊý¾Ý¿â·þÎñÆ÷£¬¾ÍÊǿͻ§¶ËÏò¼ºÔËÐеÄÊý¾Ý¿â·þÎñÆ÷·¢³öÁ¬½ÓÇëÇó£¬
³É¹¦ÒÔºó¾Í¿ÉÒÔ¶ÔÊý¾Ý¿â½øÐÐÏàÓ¦²Ù×÷£¬ÓÉÓÚÓû§µÄȨÏÞ²»Í¬£¬ËùÄܽø
ÐеIJÙ×÷Ò²²»Ò»Ñù¡£PHPÌṩÁËһϵÁÐMySQL ......
¹ØÓÚMySQL±íÉè¼ÆÓ¦¸Ã×¢ÒâµÄÎÊÌâ(×öÁ˵ãÐÞ¸Ä)
¹Ø
ÓÚÉè¼Æ±íʱӦ¸Ã×¢ÒâµÄÎÊÌâ
ÈçÓдíÎó»¶Ó´ó¼ÒÖ¸³ö¡£Õâ
¶Îʱ¼äÔÚ¼ÒÀ×öÁ˵ãÐÞÕý¡£
1
¡¢É÷ÖØÑ¡Ôñ±íÃû¡£
ÓÐ
Á½ÖÖÑ¡Ôñ£º
°´ÕÕ ......
Mysql£¬SqlServer£¬OracleÖ÷¼ü×Ô¶¯Ôö³¤µÄÉèÖÃ
1¡¢°ÑÖ÷¼ü¶¨ÒåΪ×Ô¶¯Ôö³¤±êʶ·ûÀàÐÍ
ÔÚmysqlÖУ¬Èç¹û°Ñ±íµÄÖ÷¼üÉèΪauto_incrementÀàÐÍ£¬Êý¾Ý¿â¾Í»á×Ô¶¯ÎªÖ÷¼ü¸³Öµ¡£ÀýÈ磺
create table customers(id int auto_increment primary key not null, name varchar(15));
insert into customers(name) values("name1"),("nam ......