易截截图软件、单文件、免安装、纯绿色、仅160KB

如何修改MYSQL的默认编码

MySQL的默认编码是Latin1,不支持中文.要让默认编码变为utf8。可进行如下配置:
SET GLOBAL character_set_client     = utf8;
SET GLOBAL character_set_connection = utf8;
SET GLOBAL character_set_database   = utf8;
SET GLOBAL character_set_results    = utf8;
SET GLOBAL character_set_server     = utf8;
SET GLOBAL character_set_system     = utf8;
重启Mysql:
检查结果:
show variables like "char%";


相关文档:

MySQL数据库文件介绍

本文链接http://www.chysoft.net/files/article_234.htm 更多资讯请进入www.chysoft.net 
mysql的数据储存目录在mysql的配置文件my.ini文件设置,格式如下:
# Uncomment the following rows if you move the MySQL distribution to another
# location
basedir = d:/cyoa/mysql_cy/
datadir = d:/cyoa/mysq ......

php学习笔记(13):PHP+MYSQL简单分页

conn.php
<?php
/*
 * Created on 2010-1-6
 * Author:CHAUVET
 * Function:连接字符串
 */
 $conn=@mysql_connect("localhost","root","")or die("连接数据库出错!");
 mysql_select_db("newdb",$conn);
 mysql_query("set names 'gb2312'");
 function ReplaceSom ......

Mysql开启日志

原文转自:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql开启日志
2008-11-18 11:23
是否启用了日志
mysql>show variables like 'log_bin';
怎样知道当前的日志
mysql> show master status;
看二进制日志文件用mysqlbinlog
shell>mysqlbinlog mail-bin.000001(要写绝对问题 ......

Mysql数据备份以及异地存储

整理tuscany.org.cn的服务器,发现3年前写的脚本还在跑着 :)
脚本如下:
#==========================================================
#!/bin/bash
current_date=`date +%Y-%m-%d:%H:%M:%S`
/usr/local/mysql/bin/mysqldump -prootpass  dbname1 > ./DB_DIR/dbname1_"$current_date"_dump_file.sql 
......

MySQL 远程连接

问题:远程连接服务器的数据库
$ mysql -hserverip -uuser -ppassword
ERROR 1045 (28000): Access denied for user 'user'@'localhost'
(using password: YES)
原因:mysql.user表中没有设置远程连接
$ mysql -uroot -ppassword  #用root用户在server上登录
mysql> select host, user, password from mysql ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号