mysql5.1win7_免安装版mysql5.1.57在win7下成功配置
mysql下载回来之后解压到D:/mysql-5.1.57-win32,把D:/mysql-5.1.57-win32/bin加入到系统环境变量Path中。
然后需要简单的配置mysql数据库,把my-small.ini改名为my.ini(其他的几个文件也可以直接拿过来修改一下名字),编辑文件my.ini,其内容完整如下
# Example MySQL config file for small systems.
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8
basedir=D:/mysql-5.1.57-win32
datadir=D:/mysql-5.1.57-win32/data
default-storage-engine = MyISAM
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id= 1
# Uncomment the following if you want to log updates
#log-bin=mysql-bin
# binary logging format - mixed recommended
#binlog_format=mixed
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C://mysql//data//
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C://mysql//data//
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
重点配置:配置了客户端和服务器端的默认字符编码为utf8(default-character-set = utf8),防止输入中文数据时,保存后读取出来变成问号。mysql安装目录和数据库保存目录,默认数据库引擎为MyISAM。3、运行中启动数据库
输入:mysqld.exe就可以启动服务了
cmd中关闭数据库命令mysqladmin -u root shutdown
MySQLWorkbench
可以使用官方提供的这个软件进行数据库操作。
JDBC连接MySQL
import java.sql.Connection;
import java.sql.DriverManager;
/**
*专门负责数据库打开和关闭操作的类
* @author Administrator
*
*/
public class DatabaseConnection {
private static final String DBDRIVER = "org.gjt.mm.mysql.Driver";
private static final String DBURL = "jdbc:mysql://localhost:3306/mldn";
private static final String DBUSER ="root";
private static final String DBPASSWORD = "";
private Connection conn = null;
public DatabaseConnection() throws Exception{
try {
Class.forName(DBDRIVER);
this.conn = DriverManager.getConnection(DBURL,DBUSER,DBPASSWORD);
} catch (Exception e) {
// TODO: handle exception
throw e;
}
}
public Connection getConnection(){
return this.conn;
}
public void close() throws Exception{
if(conn != null){
try {
this.conn.close();
} catch (Exception e) {
// TODO: handle exception
throw e;
}
}
}
}
推荐:mysql安装版在xp下的安装(win7没有尝试过)有每个步骤的截图
分享到:
2011-06-05 11:47
浏览 549
评论
mysql5.1win7_免安装版mysql5.1.57在win7下成功配置相关推荐
- mysql5.1免安装版配置_mysql5.1免安装版配置
本文为Windows下配置mysql5.1免安装版 一.去官网下载下来压缩包. 二.将压缩包解压在某个位置 例如:E:/Java/mysql-5.1.73 三.配置my.ini文件 # Exampl ...
- linux免安装mysql_linux上免安装版MySQL5.7.18的教程详解
1. 下载mysql 从官网下载mysql的压缩包 mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz 2 把下载的包上传到linux上,先安装下依赖包:Ubun ...
- linux mysql5.7免安装版配置_MySQL5.7免安装版配置
Win10 X64下MySQL5.7免安装版配置 1.下载MySQL免安装版 地址:http://dev.mysql.com/downloads/mysql/ 下载Windows (x86, ...
- mysql5.5免安装版教程_Mysql5.5 免安装版配置步骤
1. 下载免安装版mysql-5.5.43-win32.zip ,解压缩 http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.43-win32.zip ...
- 制作MySql5绿色免安装版(一键启动服务)
制作MySql5绿色免安装版(一键启动服务) 前言 MySQL安装有镜像和免安装的,相比较而言免安装简单一下,但免安装使用命令初始化mysql服务会安装到C盘,本篇文章介绍一键启动服务绿色免安装,制作 ...
- Mysql5.5 免安装版配置步骤
1. 下载免安装版mysql-5.5.43-win32.zip ,解压缩 http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.43-win32.zip ...
- MySQL5.7免安装版图文教程
文章目录 MySQL5.7免安装版图文教程 下载免安装版压缩包 安装MySQL 设置环境变量 配置MySQL MySQL5.7免安装版图文教程 下载免安装版压缩包 压缩包直接用官网的 MySQL官网 ...
- mysql5.5免安装版教程_mysql 5.5.56免安装版配置方法
mysql 5.5.56免安装版配置方法,本文通过文字代码详解,具体内容如下所示: 1. 下载mysql-5.5.56-winx64 网址: dev.mysql.com/downloads/mysql ...
- MySQL5.7免安装版安装教程(完全卸载MySQL后)
如果未完全卸载,点击以下链接 Windows完全卸载MySQL 注:安装MySQL分为安装版和免安装版,本次安装为免安装版,下载压缩包根据以下步骤操作即可 1.下载mysql5.7压缩包 点击此处进入 ...
最新文章
- Security-OAuth2.0 密码模式之客户端实现
- 操作系统(Linux与Windows)的进程管理
- Angular HTTPClient的使用方法
- excel实战应用案例100讲(十五)-在Excel中对Python进行操作完美工具PyXLL-Jupyter
- C 语言实例 - 约瑟夫生者死者小游戏
- Win32环境下动态链接库(DLL)编程原理
- Ubuntu16.04安装系统之后软件无法安装
- ARM交叉编译工具链
- 汇编语言集成编译器android,辰灿汇编语言集成开发环境
- Windows 11彻底禁用IE浏览器后,银行网银系统完全解决方案!
- 网赚项目:揭秘闲鱼项目,信息差赚钱新手也能日入200+
- 4步讲解一维数组传参与二维数组传参
- 财富管理技术服务商NewBanker完成千万级美元 Pre-C 轮融资
- MATLAB:一维插值算法
- java Workbook接口 提供的方法
- Linux 操作必备 150 个命令,速度收藏~
- druid监控无法关闭(坑),及处理方式
- 科普 | 什么是ChatGPT?试用ChatGPT,ChatGPT的启示!
- 明翰英语教学系列之冠词篇
- 基于android平台的条码扫描软件的设计与实现,基于android平台的条码扫描软件的设计与实现...