ÈçºÎÔÚwindows µÄmysql°ÑÊý¾Ý¿â·Åµ½dÅÌ
windows Ï°²×°Ò»¸ömysql £¬×°ÔÚcÅÌ ÏÖÔÚcÅÌ¿Õ¼ä»ù±¾¿ìûÓÐÁË £¨ºÜ¶àÈí¼þĬÈÏÊÇ×°ÔÚcÅÌ£© ÏëÖªµÀÈçºÎÔÚwindows µÄmysql Ï°ÑÊý¾Ý¿â·Åµ½dÅÌ £¨linux»áµÄ £¬²»ÖªµÀwinodwsÈçºÎ×÷£©
Ö±½Ó¸´ÖƹýÈ¥¡£È»ºó¸ÄÒ»ÏÂÄãµÄ my.ini ÎļþÖеÄÏà¹Ø·¾¶£¬±ÈÈçdatadir, basedir µÈ£¬ÄãÔÚÎļþÖÐËÑË÷һϠC: £¬Ïà¹ØµÄ»»µô¡£ È»ºóµ½×¢²á±íÖÐÈ¥ÐÞ¸ÄһϠmysql µÄ·þÎñÏîÖÐµÄ Ö´ÐÐÎļþ·¾¶¡£ µ±È»Èç¹ûÄãÊÇÖ±½ÓÊÖ¹¤Æô¶¯µÄÕâ¸öÔò²»ÐèÒª¡£ linux»áµÄ»° window¸üûÎÊÌâÁË Í¬ÑùÖ¸¶¨Â·¾¶ºÍĿ¼¾Í¿ÉÒÔÁË Ò»¶¨ÒªÕÒµ½datadir Ëü´æ´¢Êý¾Ý¿âÊý¾Ý °ÑÊý¾Ý¿â·Åµ½dÅÌ ÐÞ¸Ämy.ini ºÍ ×¢²á±í ÖØÆôÊý¾Ý¿â ½á¹û·¢ÏÖ Òì³£ÖÕÖ¹£¿£¿£¿£¿ ERROR woo3(HY000) can 't to mysql server on 'loclahost ' (10061) ¿ØÖÆÃæ°å Æô¶¯ mysql·¢ÏÖ ÔÚ±¾µØ¼ÆËã»úÎÞ·¨Æô¶¯ mysql·þÎñ ´íÎó 1067 ½ø³ÌÒâÍâÖÕÖ¹ Í£Ö¹·þÎñ£¬°ÑÊý¾ÝÎļþ¿½±´¹ýÈ¥ºó£¬È»ºóÐÞ¸Ämy.iniÕâÑùÅäÖÃÎļþϵÄdatadir¡£ ÐèÌرð×¢ÒâµÄ£¬Èç¹ûÄãÁ¬my.iniÔÚÄÚµÄÕû¸öĿ¼¶¼¿½±´¹ýÈ¥Á˵Ļ°£¬ÒòΪmy.iniÅäÖÃÎļþµÄ·¾¶¸ü¸ÄÁË£¬ËùÒÔ£¬µÃ°Ñmysql·þÎñÀïÃæµÄ--defaults-file¸ü¸ÄÁ˲ÅÄÜÕý³£Æô¶¯·þÎñ¡£ÒýÓà ¿ØÖÆÃæ°å Æô¶¯ mysql·¢ÏÖ ÔÚ±¾µØ¼ÆËã»úÎÞ·¨Æô¶¯ mysql·þÎñ ´íÎó 1067 ½ø³ÌÒâÍâÖÕÖ¹ Õâ¸ö¹À¼Æ¿ÉÄÜÊÇÄãµÄmy.iniÀïÃæµÄdatadirÖ®ÀàµÄ²ÎÊýûÐ޸Ķԣ»Ò²ÓпÉÄÜÄãÁ¬my.iniÅäÖÃÎļþÒ²Ò»ÆðǨÒÆÁË£¬¶ømysqlµÄ·þÎñÖ
Ïà¹ØÎÊ´ð£º
Èç¹ûÎÒÊäÈëÒ»¸ö¹Ø¼ü×Ö,Èç¹ûÓÐÒ»¸ö¹¤¾ß,¿ÉÒÔÔÚÖ¸¶¨Êý駿âÖвéÑ°ËùÓÐ±í²¢ÁгöÕÒµ½µÄ½á¹û, ²»ÖªµÀÓÐûÓÐÕâÖÖÀàÐ͵ÄMYSQL Êý¾Ý¿â¹¤¾ß Èç¹ûÎÒÏÂÔØÁËÒ»¸ö³ÌÐò,ËüµÄ½Å×¢FOOT ÊÇдÔÚÊý¾ÝÖеÄÈç¹ûÓÐÒ» ......
ÎÒÔÚ×¢²áÒ³ÃæдÈëÁËÈçÏ´úÂ룺 <?php $conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error()); & ......
mysqlÃüÁîÐпͻ§¶ËÏÔʾÂÒÂë mysql> select * from userinfo; +--------+----------+----------+------+-----------+-----------+ | autoid | username | password | sex | realname | q ......
import java.sql.*; public class A { public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver"); String url="jdbc:mysql://localhost ......
ÀûÓÃload data infileÃüÁîµ¼ÈëuserDesc.txtÊý¾Ý£¬Êý¾Ýµ¼ÈëºóËùÓеÄÖÐÎľÓȻȫÊÇÂÒÂ룬 mysql×Ö·û¼¯ÉèÖÃÈçÏ£º -> ; +--------------------------+----------------------------------- ......