mysql ʹÓÃÏà¹Ø ³ÖÐø¸üÐÂÖÐ...
mysqlÍ£Ö¹ÃüÁî
bin/mysqladmin -uroot -p shutdown
mysqlÆô¶¯ÃüÁî
bin/mysqld_safe &
mysql ÐÞ¸ÄrootÃÜÂë
1.Í£Ö¹mysql·þÎñ
2.Æô¶¯mysql·þÎñʱ¸½¼Ó²ÎÊý
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.ÒÔroot½øÈëmysql
mysql -u root mysql
4.Ö´ÐÐsqlÓï¾ä
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
5.ÖØÆômysql·þÎñ
6.ʹÓÃmysql -uroot -p À´²âÊÔ¼´¿É
Ïà¹ØÎĵµ£º
1£¬Mysql²åÈë¶þ½øÖÆ´ó¶ÔÏó³öÏÖÒì³££¬²åÈë¶þ½øÖƳöÏÖÒì³££¬Ôõô½â¾öcom.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
½â¾ö°ì·¨£ºurl=url=+"?useUnicode=true& ......
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%
//Á¬½ÓÊý¾Ý¿â
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection connection= java.sql.DriverManager.getConnection("jdbc:mysql://localhost/dangyuan","root", ......
ÔÚÊý¾Ý¿âÓ¦Óã¬ÎÒÃǾ³£ÒªÓõ½Î¨Ò»±àºÅ¡£ÔÚMySQLÖпÉͨ¹ý×ֶεÄAUTO_INCREMENTÊôÐÔÀ´×Ô¶¯Éú³É¡£MySQLÖ§³Ö¶àÖÖÊý¾Ý±í£¬Ã¿ÖÖÊý¾Ý±íµÄ×ÔÔöÊôÐÔ¶¼ÓÐËù²»Í¬¡£
ISAM±í
Èç¹û°ÑÒ»¸öNULL²åÈëµ½Ò»¸öAUTO_INCREMENTÊý¾ÝÁÐÀïÈ¥£¬MySQL½«×Ô¶¯Éú³ÉÏÂÒ»¸öÐòÁбàºÅ¡£±àºÅ´Ó1¿ªÊ¼£¬²¢1Ϊ»ùÊýµÝÔö¡£
µ±²åÈë¼Ç¼ʱ£¬Ã»ÓÐΪAUTO_INCREMENTÃ÷È ......
Ö÷´Ó·þÎñÆ÷±íÀàÐ͵ÄÑ¡Ôñ
Ò»°ãµÄ¹²Ê¶ÊÇÖ÷·þÎñÆ÷ʹÓÃinnodb£¬ÊÂÎñ£¬ÐÐËøµÈ¹¦ÄÜÊÇmyisamËùûÓе쬶ÔÐ޸IJÙ×÷¶øÑÔ£¬Ëü¸ü¸ßЧ£»´Ó·þÎñÆ÷ʹÓÃmyisam£¬È«ÎļìË÷¹¦ÄÜÊÇinnodbËùûÓеģ¬¶Ô²éѯ²Ù×÷¶øÑÔ£¬Ëü¸ü¸ßЧ¡£ÕâÑù¾Í¿ÉÒÔ¸÷¾¡ÆäÄÜ¡£
ºÇºÇ£¬Ö÷´Ó¿â¸÷˾ÆäÖ°£¬Ö÷¿â£º×î¿ìµÄËÙ¶È×öÌí¼Óɾ³ýÐ޸IJÙ×÷£¬´Ó¿â£¬×î¿ìµÄËÙ¶È×ö²éѯ²Ù×÷
......