2014-07-13 16:35:34
来源:中存储网
1. 解压缩mysql-5.5.24-win32.zip到目录D:servermysql5.5中
2.
创建环境变量MYSQL_HOME=D:servermysql5.5,在path变量后添加;%MYSQL_HOME%bin
3. 进入DOS窗口到D:servermysql5.5bin目录下,添加系统服务(添加成功后默认自动启动)
eg:mysqld --install mysql
--defaults-file=d:servermysql5.5my.ini
其中my.ini需进行如下修改:
#The MySQL server
[mysqld]
port
= 3306
basedir
= D:\server\mysql5.5
datadir
= D:\server\mysql5.5\data
character-set-server = utf8
collation-server =
utf8_general_ci
4. 删除系统服务
mysqld --remove mysql
5. 启动和关闭系统服务
net start mysql
net stop mysql
6. 登陆root用户并修改密码
mysql -u root -p
Enter Password: #不输入直接回车默认密码
进入mysql>
#mysql命令行
set password for 'root'@'localhost' =
password('123456');
set password for 'root'@'127.0.0.1' =
password('123456');
set password for 'root'@'::1' =
password('123456');
set password for 'root'@'%' =
password('123456');