mysql免安装版

1 下载mysql-noinstall-5.1.60-winx64,并解压文件,复制my-small,并添加下面内容:

 

# 设置客户端字符集
default-character-set=utf8
# 默认的引擎为MyIASM,修改为InnoDB。
default-storage-engine=InnoDB

# set basedir to installation path, e.g., c:/mysql
# 设置为MYSQL的安装目录
basedir=D:\\Program Files\\mysql-5.1.60-x64
# set datadir to location of data directory,  e.g., c:/mysql/data
# 设置为MYSQL的数据目录
datadir=D:\\Program Files\\mysql-5.1.60-x64\\data

2 cmd 执行:

 

D:\Program Files\mysql-5.1.60-x64\bin>
执行
mysqld --install mysql --defaults-file="D:\Program Files\mysql-5.1.60-x64\my.ini"
启动mysql
net start mysql
关闭mysql
net start mysql

3 修改密码

D:\Program Files\mysql-5.1.60-winx64\bin>mysql -u root
mysql>set password for 'root'@'localhost'=password('newpasswd');

 或

mysql>use mysql;
mysql>update set password=password('123456') where host='localhost' and user='root'
mysql>flush privileges;
mysql>exit

你可能感兴趣的:(mysql)