Home  >  Article  >  Database  >  Mysql记录

Mysql记录

WBOY
WBOYOriginal
2016-06-07 15:34:531141browse

停止服务: binnet stop mysql binmysqladmin -u root shutdown 启动服务: binnet start mysql 在mysql\bin目录中,双击mysqladmin.exe文件 计算机管理-服务-启动mysql服务 binmysqladmin -u root shutdown语句中的root不能换成其他用户。 net start mysql和n

停止服务:

bin>net stop mysql

bin>mysqladmin -u root shutdown

启动服务:

bin>net start mysql

在mysql\bin目录中,双击mysqladmin.exe文件

计算机管理->服务->启动mysql服务

 

bin>mysqladmin -u root shutdown语句中的root不能换成其他用户。

net start mysql和net stop mysql中的mysql 指的是mysql服务,而不是特定的数据库名字。




修改数据库data目标指向位置。

更改默认的mysql数据库目录

将 C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data 改到 D:\MysqlData

1. 建立文件夹 D:\MysqlData

2. 停止 mysql 服务,将 "C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data" 所有文件,拷贝到 D:\MysqlData

3. 在 mysql 安装目录找到 my.ini文件,找到:

#Path to the database root
#datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"

将datadir的值改为:  datadir="D:/MysqlData/"

保存后,重新启动mySQL服务即可。


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn