½â¾öÈçºÎÐÞ¸Ämysql·þÎñÆ÷¼àÌý¶Ë¿ÚµÄÎÊÌâ
1£©Èç¹ûÄã°²×°µÄÊÇϵͳ×Ô´øµÄrpm°üµÄÇé¿ö£º
ÐÞ¸Ä /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
port=3300 #Ð޸ijÉÄã×Ô¼ºÏëÒªµÄ¶Ë¿Ú
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
±£´æÍ˳ö¡£
2£©Èç¹ûÄã°²×°µÄÊÇÆäËûÔ´Âë°ü»òÕßÔÚͬһ·þÎñÆ÷Éϰ²×°¶à¸ömysqld·þÎñµÄÇé¿ö£º
ͬÑùµÄÅäÖã¬ÕÒ³ömy.cnf Îļþ¡£Ìí¼Óport= ¶Ë¿ÚºÅ
ÐèҪעÒâµÄÊÇ
[client]
port = 3300
ÕâÀïÒ²Òª¸Äһϡ£
Ïà¹ØÎĵµ£º
¹²3¸öÎļþ
IncDB.phpÊý¾Ý¿âÁ¬½Ó
index.phpÊ×Ò³
InsetToDB.phpÊý¾Ý¿â²Ù×÷
Êý¾Ý¿âlguestbookÀïÃæ½¨±í
CREATE TABLE `intd` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) character set utf8 collate utf8_bin N ......
Ò»¡¢Á¬½ÓMYSQL
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£ºmysql>
2¡¢Àý2£ºÁ¬½Óµ½Ô ......
°²×°ºóMYSQL5ºó£¬·¢ÏÖÆô¶¯³ö´í.
³ö´í´úÂ룺1067
½â¾ö°ì·¨ÈçÏ£º
ɾ³ý%windows%/my.ini
ɾ³ýÆäËüµØ·½µÄmy.ini
ÔÚmysql°²×°Ä¿Â¼Ï°Ñmy-small.ini¸´ÖÆÎªmy.ini
ÔÚmy.ini×îºóÒ»ÐвåÈ룺
CODE:
[mysqld]
#ÉèÖÃbasedirÖ¸ÏòmysqlµÄ°²×°Â·¾¶
basedir=C:\mysql-5.1.11-beta-win32
datadir=C:\mysql-5.1.11-beta-win32\dat ......
1¡¢½øÈëmysql£¬´´½¨Ò»¸öÐÂÓû§xuys£º
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿âÃû.±íÃû Óû§@µÇ¼Ö÷»ú identified by "Óû§ÃÜÂë";
grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234";
²é¿´½á¹û£¬Ö´ÐУº
use mysql;
select host,user,p ......