windows64系统中mysql64位绿色安装

将下载压缩包解压到任意目录

配置安装文件:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]

[client]
#password = 111111
port = 3306
socket = /tmp/mysql.sock
default-character-set=gbk
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir =F:\SysData\mysql
datadir =F:\SysData\mysql\data
port = 3306
socket = /tmp/mysql.sock
default-character-set=uft8
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

在命令窗口中进入解压包的bin目录执行以下命令:

  1. mysqld --install mysql --defaults-file=[解压文件所以完整目录]\my-default.ini【运行安装服务】
  2. net start mysql【启动服务】
  3. net stop mysql【停止服务】
  4. mysqld --remove mysql【移除服务】
  5. mysql -u root -p【有密码连接数据库服务】
  6. mysql -u root【无密码连接到数据库服务】
  7. mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');【为root设置登录密码】

修改root密码:

mysql -u root

mysql> use mysql;

mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';

mysql> FLUSH PRIVILEGES;

posted @   BicycleBoy  阅读(244)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示