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

mysql字符集查看以及修改

转自:http://blog.chinaunix.net/u2/85344/showart_2042280.html
Liunx下修改MySQL字符集:
1.查找MySQL的cnf文件的位置
find / -iname '*.cnf' -print

/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/texmf/web2c/texmf.cnf
/usr/share/texmf/web2c/mktex.cnf
/usr/share/texmf/web2c/fmtutil.cnf
/usr/share/texmf/tex/xmltex/xmltexfmtutil.cnf
/usr/share/texmf/tex/jadetex/jadefmtutil.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-innodb-heavy-4G.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-large.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-small.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-medium.cnf
/usr/share/doc/MySQL-server-community-5.1.22/my-huge.cnf
2. 拷贝 small.cnf、my-medium.cnf、my-huge.cnf、my-innodb-heavy-4G.cnf其中的一个到/etc下,命名为my.cnf
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
3. 修改my.cnf
vi /etc/my.cnf
在[client]下添加
default-character-set=utf8
在[mysqld]下添加
default-character-set=utf8
4.重新启动MySQL
[root@bogon ~]# /etc/rc.d/init.d/mysql restart
Shutting down MySQL                                        [ 确定 ]
Starting MySQL.                                            [ 确定 ]
[root@bogon ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-community-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
5.查看字符集设置
mysq


相关文档:

安装、设置与启动MySql绿色版的方法

1、解压 mysql-noinstall-5.1.30-win32.zip
2、在 F 盘建立目录 MySql\MySqlServer5.1\
3、把解压的内容复制到  F:\MySql\MySqlServer5.1\
4、在 F:\MySql\MySqlServer5.1\ 中找 my-large.ini 把它复制成 my.ini
5、在 my.ini 中找 [mysqld] ,添加以下语句;
basedir="F:/MySql/MySqlServer5.1/"
datadir="F:/My ......

MySQL Master/Slave Server 架设



环境:两台服务器IP:192.168.30.57\192.168.30.58
1、下载mysql-5.0.86-linux-i686-glibc23.tar.gz 到http://dev.mysql.com/downloads/mysql/5.0.html#linux下载
2、解压 tar -zxvf
mysql-5.0.86-linux-i686-glibc23.tar.gz
3、创建链接 ln -s
mysql-5.0.86-linux-i686-g ......

mysql connect by c++

#include <stdio.h>
#include <windows.h>
#include <mysql.h>
#define host "localhost"
#define username "root"
#define password "123"
#define database "oa"
MYSQL *conn;
int main()
{
MYSQL_RES *res_set;
MYSQL_ROW row;
unsigned int i,ret;
FILE *fp;
MYSQL_FIELD *field; ......

在C#.net程序中使用MYSQL数据库

下面是commond:
MySQLCommand cmd;
cmd = new MySQLDriverCS.MySQLCommand("DROP TABLE IF EXISTS test.mysqldrivercs_test",conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
下面是insert:
string Value = "Value";
int SettingID = 1;
new MySQLInsertCommand(conn,
new object[,] {{"SettingID",SettingID},{"S ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号