安装Mysql
[mysqld]
# set basedir to your installation path
basedir=C:/www/mysql- 5.0.18-win32
# set datadir to the location of your data directory
datadir=C:/www/mysql- 5.0.18-win32/data
Mysql启动和停止
The server continues to write to the console any further diagnostic output it produces. You can open a new console window in which to run client programs.
C:/www/mysql- 5.0.18-win32/bin> mysqladmin -u root shutdown
注意:如果MySQL root
帐户设置了密码,则命令应为:
C:/www/mysql- 5.0.18-win32/bin> mysqladmin -u root -p shutdown
data
目录下,
It is the file with a suffix of
.err
。
Mysql添加到Windows服务(这一步可选)
2. 如果想手动启动,用下列命令。
C:/www/mysql- 5.0.18-win32/bin> mysqld --install-manual
3. 停止MySql服务。相应的,可以用NET STOP命令来停止MySql服务:
C:/www/mysql- 5.0.18-win32/bin> net stop mysql
4. 从Windows服务中移除Mysql服务。先停止服务,再执行命令:
Mysql用户管理
1. Adding New User Accounts to MySQL

'monty'@'%')可以用来从其他任何主机来连接mysql。
mysql> GRANT RELOAD, PROCESS ON *.* TO 'admin'@'localhost';
mysql> GRANT USAGE ON *.* TO 'dummy'@'localhost';
下面shell表示命令路径:C:/www/mysql- 5.0.18-win32/bin
shell> mysqladmin -u user_name -h host_name password "newpwd"
以下将root帐户的密码改为abcd,这时需要用-p选项输入旧密码。


