Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

²é¿´¼°ÐÞ¸ÄmysqlÊý¾Ý¿âµÄĬÈϱàÂë2

ʹÓÃmysql ¾­³£»áÓöµ½±àÂëÎÊÌ⣬¶øµ¼Ö³ÌÐò³öÏÖÂÒÂë,mysql ÔÚÒÔϼ¸¸öµØ·½»áÉæ¼°µ½±àÂë¸ñʽ
Êý¾Ý¿â±àÂë
·þÎñÆ÷±àÂë
Á¬½Ó±àÂë
¿Í»§¶Ë±àÂë
ÏÂÃæÊÇÒ»¸öµäÐ͵ÄʾÀý£¬ ÔËÐÐ mysql -u root
²é¿´±àÂë mysql>status
mysql Ver 14.7 Distrib 4.1.14, for Win32 (ia32)
Connection id: 90
Current database: yitian
Current user: ODBC@localhost
SSL: Not in use
Using delimiter: ;
Server version: 4.1.14
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: gbk
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 1 hour 28 min 21 sec
Server characterset: latin1 ·þÎñÆ÷ʹÓõıàÂëΪ latin1
Db characterset: gbk Êý¾Ý¿â yitianµÄ±àÂëΪ GBK
Client characterset: latin1 client ¶ËΪ latin1
Conn. characterset: latin1 Á¬½ÓµÄ±àÂëΪ latin
Èç¹ûÎÒÃÇҪʹÓÃÖ§³ÖÖÐÎÄµÄ gbk Êý¾Ý¿â£¬ ¾ÍÒªÔÚ´´½¨Êý¾Ý¿âʱ£¬Ê¹ÓÃÏÂÃæµÄÓï·¨
GBK ʹÓÃ
CREATE DATABASE yitian DEFAULT CHARACTER SET gbk
COLLATE gbk_chinese_ci;
utf8 ʹÓÃ
CREATE DATABASE IF NOT EXISTS yitian default charset
utf8 COLLATE utf8_general_ci;
Èç¹ûÒªÐÞ¸ÄÒÑ´æÔÚµÄÊý¾Ý¿âÉèÖÃʹÓÃ
alter database testdb character set
utf8
È»ºóÔÚ³ÌÐòÖÐÁ¬½ÓʱҲӦ¸ÃÉ趨ÏàÓ¦µÄ×Ö·û¼¯ , ʹÓÃ
SET CHARACTER SET GBK;
ÕâʱÔٲ鿴¿´Ï±àÂë
mysql>status
mysql Ver 14.7 Distrib 4.1.14, for Win32 (ia32)
Connection id: 90
Current database: yitian
Current user: ODBC@localhost
SSL: Not in use
Using delimiter: ;
Server version: 4.1.14
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: gbk
Client characterset: gbk
Conn. characterset: gbk
TCP port: 3306
Uptime: 1 hour 33 min 22 sec
¾Í¿ÉÒÔʹÓóÌÐòÕýȷдÈëºÍ¶ÁÈ¡Êý¾ÝÁË
Èç¹ûÒª¸Ä±äÊý¾Ý¿âµÄĬÈϱàÂë¿ÉÒÔÐÞ¸Ä my.ini
ÉèÖÃ my.ini
#default-character-set=GBK
default-character-set = UTF8


Ïà¹ØÎĵµ£º

linux mysql ¿ª·¢»·¾³

°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
 sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......

½â¾öMySQL²»ÔÊÐí´ÓÔ¶³Ì·ÃÎʵķ½·¨

½â¾öMySQL²»ÔÊÐí´ÓÔ¶³Ì·ÃÎʵķ½·¨
2009-06-04 13:11
1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
Sql´úÂë ¸´ÖÆ´úÂë
   1. mysql -u root -pvmwaremysql>us ......

MySQLÃüÁî

1.Á¬½ÓMySQLÊý¾Ý¿â
echo on¡¡¡¡
cd c:\Program Files\MySQL\MySQL Server 5.2\bin
mysql -uroot -ppass
2¡¢ÏÔʾÊý¾Ý¿âÁÐ±í¡£
show databases;
3¡¢ÏÔʾ¿âÖеÄÊý¾Ý±í£º
use mysql; //´ò¿ª¿â£¬
show tables;
4¡¢ÏÔʾÊý¾Ý±íµÄ½á¹¹£º
describe ±íÃû;
5¡¢½¨¿â£º
create database ¿âÃû;
6¡¢½¨±í£º
use ¿âÃû;
creat ......

MySQLÖеÄÒ»¸öÄÑÌâ

×òÌ죬ÎÒͻȻÏë°ÑÒ»¸öÊý¾Ý¿âÀïµÄÿ¸ö±í£¬ÒÔ¼°Ã¿¸ö±íµÄ·Ç¿Õ×ܼͼÊý´æÔÚÁíÒ»¸ö±íÀïÃæ¡£
Ê×ÏÈ£¬´´½¨ÁËÒ»¸ö´æ·ÅÊý¾ÝµÄ±í£º
create table tables
(
name varchar(50),
number int
);
insert into tables select table_name from information_schema.tables where table_shema = 'test';
µ«ÊDz»ÖªµÀÓÐûÓз½·¨£¬½«·Ç¿ÕµÄ ......

Mysql for linux mysql×Ô¶¯±¸·Ý½Å±¾

¿ÉÒÔ½«Õâ¸ö½Å±¾·Å½øcrontab£¬ËûµÄÅäÖÆÎļþÔÚ /etc/crontabÖÐÿÌìÁ賿ִÐÐÒ»´Î£¬×Ô¶¯±¸·Ý Õâ¸ö½Å±¾Ã¿Ìì×î¶àÖ»Ö´ÐÐÒ»´Î£¬¶øÇÒÖ»±£Áô×î½üÎåÌìµÄ±¸·ÝÔÚ·þÎñÆ÷ÉÏ¡£
#!/bin/bash
#This is a ShellScript For Auto DB Backup
#Powered by aspbiz
#2004-09
#Setting
#ÉèÖÃÊý¾Ý¿âÃû£¬Êý¾Ý¿âµÇ¼Ãû£¬ÃÜÂ룬±¸·Ý·¾¶£¬ÈÕ־ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ