上回说道本地的mysql安装修改密码,连接本地的navicat 可能 还有些细节 或者不清楚的地方。今天抽空重新讲解下。
1.下载?mysql-5.6.17-winx64的zip. 放在目录里面,下面给出zip
2.解压当前的文件。
3.解压一堆文件之后,有bin 和 ?my-default.ini文件
我吧 修改后的my-default.ini 文件放在下面,先别忙着复制。里面有mysql的安装路劲。请参照你自己的安装路劲修改,不然启动不了。
?
# 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.
?
[WinMySQLAdmin]
#指定mysql服务启动的文件
Server = D:/Mysql/mysql-5.6.17-winx64/bin/mysqlId.exe
[mysqld]
?
# 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 = D:/Mysql/mysql-5.6.17-winx64
datadir = D:/Mysql/mysql-5.6.17-winx64/data
port = 3306
server_id =1
default-character-set=gbk
?
?
# 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?
?
[client]
#设置mysql客户端的字符集
default-character-set=gbk
?
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES?
?
在 bin 下启动doc窗口
?
输入:mysqld -install
显示: server successful..
?
启动mysql服务
net start mysql
?
注意:第一登陆进去是没有密码的。在mysql控制台下以root用户登录,默认root用户是没有密码的,直接按回车
命令:mysql -u root -p
?
修改密码?
使用mysqladmin命令,这里说明1234是你新设置的密码,可以根据需要设置自己的密码
mysqladmin -u root -p password 1234
按回车,然后输入你原先的密码,如果原来的密码为空,直接按回车就可以。
你的密码就设置成功。
?
?
?
退出 mysql ? : net stop mysql
?
参考:http://zhidao.baidu.com/link?url=rm79S9wUu1MYYgaTbtbbOHHHikqOBGi-8XQZ2gdATd1Vl7zDqT7Po4iZX7mgJjGmTwEs7NL_u0UOlSvHFA4lqLbF0iYPHIdBU8_a6p5beFO
?