FedoraÏÂMysqlµÄ¼òµ¥Ê¹ÓÃ
תµ½¸½Â¼1£¨mysql ÃüÁî´óÈ« - ÃüÁîÏê½â
£©
תµ½¸½Â¼2£¨mysqlÂÒÂëÎÊÌâ½â¾ö·½·¨
£©
ÔÚÎÒµÄFedoraÖУ¬ÔÚϵͳ°²×°Ê±ÎÒ¾ÍÑ¡Ôñ°²×°ÁËMysqlÁË£¬ËùÒԾͲ»ÓÃÔÙÈ¥ÏÂÔØÔ´´úÂ룬ȻºóÈ¥ÂýÂý±àÒë¡£¹þ¹þ£¬ÍµÁËÒ»¸öÀÁ¡£
ϵͳ°²×°ºÃÁË£¬Mysqlʱ±Ø²»¿ÉÉٵģ¬ËùÒÔÒ»¶¨Òª¼ìÑéÒ»ÏÂMysql¿ÉÒÔÓò»¡£
Ê×ÏÈÇл»µ½rootÕË»§£¬È»ºóÊäÈëÃüÁservice mysqld start
ϵͳÏÔʾÈçÏ£º
³õʼ»¯ MySQL Êý¾Ý¿â£º Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h stony password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script! [È·¶¨]
ÕýÔÚÆô¶¯ mysqld£º [È·¶¨]
¿´À´MysqlµÄ·þÎñ¿ÉÒÔÆô¶¯ÆðÀ´£¬Ó¦¸ÃÎÊÌâ²»´óÁË¡£
ÂíÉÏÌí¼ÓrootÃÜÂ룬mysqladmin -u root password xxxxxx
µÇ¼ÒÔÏ£¬ÊäÈëÃüÁmysql -u root -p
ÇëÇóÊäÈëÃÜÂ룬ÊäÈëÃÜÂ룬½øÈëÁË£¡^_^
µ½ÕâÀӦ¸Ã»ù±¾ÉÏ¿ÉÒÔ˵MysqlÊÇûÓÐÎÊÌâµÄÁË¡£Ê±¼ä²»ÔçÁË£¬½ñÌìµÄMysql¾ÍŪµ½ÕâÀï¡£Ã÷Ì쿪ʼ
Ïà¹ØÎĵµ£º
ÓÃmysql_query£¬mysql_fetch_array()ºóÓ¦¸ÃÒª
free_result().function count_admin($where = '')
{
if($where) $where = " WHERE $where";
$result = $this->db->get_one("SELECT count(*) as num from $this->table_admin_role $where");
return $result['num'];
} ......
ʾÀý£º
create procedure proc_name (in parameter integer)
begin
declare variable varchar(20);
if parameter=1 then
set variable='MySQL';
else
set variable='PHP';
end if;
insert into tb (name) values (variable);
end;
MySQLÀ©Õ¹Ò²ÊÇÖ§³Ö´æ´¢¹ý³ÌµÄ£¬²»¹ýÖ»Ö§³ÖÎÞ·µ»Ø½á¹ûµÄ´æ´¢¹ý³Ì
¿ÉÒÔÊ¹Ó ......
¹Ø¼ü´Ê£ºMySQL ±¸·Ý »Ö¸´
¡¡¡¡±¸·ÝÊÇ×î¼òµ¥µÄ±£»¤Êý¾ÝµÄ·½·¨£¬±¾½Ú½«½éÉܶàÖÖ±¸·Ý·½·¨¡£ÎªÁ˵õ½Ò»¸öÒ»Öµı¸·Ý£¬ÔÚÏà¹ØµÄ±íÉÏ×öÒ»¸öLOCK TABLES£¬ÄãÖ»ÐèÒ»¸ö¶ÁËø¶¨£¬µ±ÄãÔÚÊý¾Ý¿âĿ¼ÖÐ×öÎļþµÄÒ»¸ö¿½±´Ê±£¬ÕâÔÊÐíÆäËûÏ̼߳ÌÐø²éѯ¸Ã±í;µ±Äã»Ö¸´Êý¾Ýʱ£¬ÐèÒªÒ»¸öÐ´Ëø¶¨£¬ÒÔ±ÜÃâ³åÍ»¡£
¡¡¡¡Ê¹ÓÃSQL ......
MySQLÊý¾Ý¿â±¸·ÝºÍ»¹ÔµÄ³£ÓÃÃüÁî
ÔÎļûhttp://www.21andy.com/blog/20071102/655.html
ʱ¼ä£º2007-11-02 23:29:09 Àà±ð£º¼¼Êõ ·ÃÎÊ£º3,731 views RSS 2.0 ÆÀÂÛ
±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî
mysqldump -hhostname -uusername -ppassword database ......