MySQL showµÄÓ÷¨
a. show tables»òshow tables from database_name; // ÏÔʾµ±Ç°Êý¾Ý¿âÖÐËùÓбíµÄÃû³Æ
b. show databases; // ÏÔʾmysqlÖÐËùÓÐÊý¾Ý¿âµÄÃû³Æ
c. show columns from table_name from database_name; »òshow columns from database_name.table_name; // ÏÔʾ±íÖÐÁÐÃû³Æ
d. show grants for user_name@localhost; // ÏÔʾһ¸öÓû§µÄȨÏÞ£¬ÏÔʾ½á¹ûÀàËÆÓÚgrant ÃüÁî
e. show index from table_name; // ÏÔʾ±íµÄË÷Òý
f. show status; // ÏÔʾһЩϵͳÌض¨×ÊÔ´µÄÐÅÏ¢£¬ÀýÈ磬ÕýÔÚÔËÐеÄÏß³ÌÊýÁ¿
g. show variables; // ÏÔʾϵͳ±äÁ¿µÄÃû³ÆºÍÖµ
h. show processlist; // ÏÔʾϵͳÖÐÕýÔÚÔËÐеÄËùÓнø³Ì£¬Ò²¾ÍÊǵ±Ç°ÕýÔÚÖ´ÐеIJéѯ¡£´ó¶àÊýÓû§¿ÉÒԲ鿴
ËûÃÇ×Ô¼ºµÄ½ø³Ì£¬µ«ÊÇÈç¹ûËûÃÇÓµÓÐprocessȨÏÞ£¬¾Í¿ÉÒԲ鿴ËùÓÐÈ˵Ľø³Ì£¬°üÀ¨ÃÜÂë¡£
i. show table status; // ÏÔʾµ±Ç°Ê¹ÓûòÕßÖ¸¶¨µÄdatabaseÖеÄÿ¸ö±íµÄÐÅÏ¢¡£ÐÅÏ¢°üÀ¨±íÀàÐͺͱíµÄ×îиüÐÂʱ¼ä
j. show privileges; // ÏÔʾ·þÎñÆ÷ËùÖ§³ÖµÄ²»Í¬È¨ÏÞ
k. show create database database_name; // ÏÔʾcreate database Óï¾äÊÇ·ñÄܹ»´´½¨Ö¸¶¨µÄÊý¾Ý¿â
l. show create table table_name; // ÏÔʾcreate database Óï¾äÊÇ·ñÄܹ»´´½¨Ö¸¶¨µÄÊý¾Ý¿â
m. show engies; // ÏÔʾ°²×°ÒÔºó¿ÉÓõĴ洢ÒýÇæºÍĬÈÏÒýÇæ¡£
n. show innodb status; // ÏÔʾinnoDB´æ´¢ÒýÇæµÄ״̬
o. show logs; // ÏÔʾBDB´æ´¢ÒýÇæµÄÈÕÖ¾
p. show warnings; // ÏÔʾ×îºóÒ»¸öÖ´ÐеÄÓï¾äËù²úÉúµÄ´íÎó¡¢¾¯¸æºÍ֪ͨ
q. show errors; // Ö»ÏÔʾ×îºóÒ»¸öÖ´ÐÐÓï¾äËù²úÉúµÄ´íÎó
Ïà¹ØÎĵµ£º
±à¼/etc/mysql/my.cnfÎļþ£¬Ï൱ÓÚwindowsÖеÄmy.ini£º
ÕÒµ½[client]
Ìí¼Ó£º
default-character-set = utf8 // ĬÈÏ×Ö·û¼¯Îªutf8
ÕÒµ½[mysqld]
Ìí¼Ó:
default-character-set = utf8 //ĬÈÏ×Ö·û¼¯Îªutf8
init_connect = 'SET NAMES utf8' //É趨Á¬½ÓmysqlÊý¾Ý¿âʱʹÓÃutf8±àÂ룬ÒÔÈÃmysqlÊý¾Ý¿âΪutf8ÔËÐÐ
Ð޸ĺú ......
1. Mysql ×Ô¶¯Æô¶¯µÄÅäÖÃ
ÔÚMySQL°²×°³ÌÐòµÄ½âѹ°ü
/usr/local/mysql/support-files
myslq.serverµÄÆô¶¯½Å±¾³ÌÐò=¡· ¸´ÖÆ/etc/rc.d/init.dĿ¼
[root@localhost ~]# cd /etc/rc.d/init.d
¸´ÖƲ¢ÖØÃüÃûΪmysql
[root@localhost init.d]# cp /usr/local/mysql/support-files/mysql.server mysql
¸ü¸ÄÊôÐÔ¸ÄΪ“x& ......
ÔÚSQL ServerÀィMysqlºÍOracleÊý¾Ý¿âÁ´½Ó»¹ÊDZȽÏÈÝÒ׵ģºÎÒÃÇÏÈÔÚ·þÎñÆ÷ÉÏ°²×°MysqlºÍOracleÊý¾Ý¿âÏà¹ØµÄODBCÇý¶¯³ÌÐò£¬ÔÚ[¹ÜÀí¹¤¾ß]->[Êý¾ÝÔ´(ODBC)] ÉèÖÃϵͳDSN£¬ÈçÏÂͼ:
ÉèÖúÃÁËÒÔºó£¬ÎÒÃÇ¿ÉÒÔÓÃSQL Server×Ô´øµÄµ¼³öºÍµ¼È빤¾ßÀ´Êµ ......
Ò» . °²×°ÓëÅäÖÃMYSQL
¡¡¡¡¶þ . ³£ÓÃmysqlÃüÁîÐÐÃüÁî
¡¡¡¡1 .mysqlµÄÆô¶¯ÓëÍ£Ö¹
¡¡¡¡Æô¶¯MYSQL·þÎñ net start mysql
¡¡¡¡Í£Ö¹MYSQL·þÎñ net stop mysql
¡¡¡¡2 . netstat –na | findstr 3306 ²é¿´±»¼àÌýµÄ¶Ë¿Ú , findstrÓÃÓÚ²éÕÒºóÃæµÄ¶Ë¿ÚÊÇ·ñ´æÔÚ
¡¡¡¡3 . ÔÚÃüÁîÐÐÖеǽMYSQL¿ØÖÆ̨ , ¼´Ê¹Óà MYSQL COM ......
¼òÒ׽ű¾
·½±ã±¸·ÝMySQL
Êý¾Ý¿â
@echo off
echo.
echo MySQLÊý¾Ý¿â±¸·Ý
echo *****************************
echo.
echo ½ñÌìÊÇ %date%
echo ʱ¼äÊÇ %time%
echo.
echo *****************************
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
md "E:\%Ymd% ......