mysql alter Óï¾äÓ÷¨,Ìí¼Ó¡¢Ð޸ġ¢É¾³ý×ֶεÈ
Ô´µØÖ·: http://www.pcppc.cn/shujuku/mysql/shujuku_163919.html
ÄúÕýÔÚ¿´µÄMySQL½Ì³ÌÊÇ:MySQLÊý¾Ý¿âѧϰ±Ê¼Ç¡£
¡¡¡¡MySQLÊý¾Ý¿âѧϰ±Ê¼Ç
(ʵÑé»·¾³:Redhat9.0,MySQL3.23.54)
¸ÙÒª£º
Ò»£¬Á¬½ÓMySQL
¶þ£¬MySQL¹ÜÀíÓëÊÚȨ
Èý£¬Êý¾Ý¿â¼òµ¥²Ù×÷
ËÄ, Êý¾Ý¿â±¸·Ý
Î壬ºó¼Ç
Ò»£¬Á¬½ÓMySQL
¸ñʽ£ºmysql -h Ô¶³ÌÖ÷»úµØÖ· -u Óû§Ãû -p »Ø³µ
ÊäÈëÃÜÂë½øÈ룺
mysql -u root -p »Ø³µ
Enter password: ,ÊäÈëÃÜÂë¾Í¿ÉÒÔ½øÈë
mysql> ½øÈëÁË
Í˳öÃüÁî:>exit »òÕßctrl+D
¶þ£¬MySQL¹ÜÀíÓëÊÚȨ
1.ÐÞ¸ÄÃÜÂ룺
¸ñʽ£ºmysqladmin -u Óû§Ãû -p ¾ÉÃÜÂë password ÐÂÃÜÂë
2.Ôö¼ÓÐÂÓû§:
>grant create,select,update....(ÊÚÓèÏà¹ØµÄ²Ù×÷ȨÏÞ)
->on Êý¾Ý¿â.*
-> to Óû§Ãû@µÇ¼Ö÷»ú identified by 'ÃÜÂë'
²Ù×÷ʵÀý£º
¸ørootÓû§Ìí¼ÓÃÜÂë:
# mysqladmin -u root password 52netseek
ÒòΪ¿ªÊ¼rootûÓÐÃÜÂë,ËùÒÔ-p¾ÉÃÜÂëÒ»Ïî¿ÉÒÔÊ¡ÂÔ.
µÇ½²âÊÔ£º
# mysql -u root -p »Ø³µ
ÊäÈëÃÜÂë,³É¹¦µÇ½.
½«ÔÓеÄmysql¹ÜÀíµÇ½ÃÜÂë52netseek¸ÄΪ52china.
# mysqladmin -u root -p 52netseek password '52china'
´´½¨Êý¾Ý¿âÌí¼ÓÓû§²¢ÊÚÓèÏàÓ¦µÄȨÏÞ:
mysql> create database phpbb;
Query OK, 1 row affected (0.02 sec)
mysql> use phpbb;
Database changed
mysql> grant create,select,update,insert,delete,alter
-> on phpbb.*
-> to phpbbroot@localhost identified by '52netseek';
Query OK, 0 rows affected (0.00 sec)
ÊÚÓèËùÓеÄȨÏÞ:
>grant all privileges
>on bbs.*
>to bbsroot@localhost identified by '52netseek'
»ØÊÕȨÏÞ£º
revoke create,select,update,insert,delete,alter
on phpbb.*
from phpbbroot@localhost identified by '52netseek';
ÍêÈ«½«phpbbrootÕâ¸öÓû§É¾³ý:
>use mysql
>delete from user
where user='phpbbroot' and host='localhost';
>flush privileges; Ë¢ÐÂÊý¾Ý¿â
Èý
Ïà¹ØÎĵµ£º
×î½üÕÛÌÚGeoServerÓëMysqlµÄÁ¬½Ó£¬ÊÔÁ˲»ÉÙʱ¼ä£¬³öÏÖÁ˼¸¸öÎÊÌâ
1 ·¢²¼µÄ»ùÓÚmysqlÊý¾Ý¿âLayer£¬ÔÚÔ¤ÀÀʱʧ°Ü
Ïà¹Ø°æ±¾ÈçÏ£º
Gerserver 2.0.1
Mysql 5.5.1
mysql-connector-java-5.1.5.jar
gt-mysql-2.6.0.jar
ºó³¢ÊÔÌæ»»MysqlÊý¾Ý¿â°æ±¾Îª5.0 ......
×òÌìÉè¼ÆÊý¾Ý¿â±íµÄʱºò£¬ÒòΪʹÓÃvarchar²úÉúÁËÒìÒ飬½á¹ûÒ»²é·¢ÏÖÎÒÃÇÁ½¸ö˶¼Ã»´í¡£
MySQLÊý¾Ý¿âµÄvarcharÀàÐÍÔÚ4.1ÒÔϵİ汾ÖеÄ×î´ó³¤¶ÈÏÞÖÆÎª255£¬ÆäÊý¾Ý·¶Î§¿ÉÒÔÊÇ0~255»ò1~255£¨¸ù¾Ý²»Í¬°æ±¾Êý¾Ý¿âÀ´
¶¨£©¡£
ÔÚMySQL5.0ÒÔÉϵİ汾ÖУ¬varcharÊý¾ÝÀàÐ͵ij¤¶ÈÖ§³Öµ½ÁË65535£¬Ò ......
PythonÓëMysql
Ò»¡¢°²×°MySQLdbÄ£¿é
ʹÓÃpythonÁ¬½ÓMysqlµÄǰÌᣬ¾ÍÊÇÐèÒªÒ»¸öÈÃpythonÁ¬½Óµ½MysqlµÄ½Ó¿Ú£¬Õâ¾ÍÊÇMySQLdbÄ£¿é¡£
ÑéÖ¤ÊÇ·ñÒѾ°²×°ÁËMySQLdb£º
==========================================================
d:\usr\local\Python25>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v ......
# cd /home/tmp (½øÈëѹËõ°üËùÔÚĿ¼)
# groupadd mysql (½¨Á¢mysql×é)
# useradd -g mysql mysql (ÔÚmysql×éÖн¨Á¢mysqlÓû§)
# tar -zxvf mysql-5.0.37.tar.gz (½âѹmysqlÔ´Âë,bz2ѹËõ°üÇëÓÓtar -jvxf ÎļþÃû”Ö¸Áî)
# cd mysql-5.0.37 (½øÈë½âѹĿ¼)
# ./configure --prefix=/usr/local/mysql (p ......