How to modify the MySQL data directory under Windows: First stop the MySQL service and create a new data file directory; then copy the data file and authorize the new data file directory; then modify the [my.ini] file ;Finally start MySQL.
How to modify the MySQL data directory under Windows:
Stop the MySQL service:
MySQL service in windows services, stop.
Create a new data file directory:
This is the MySQL data directory you want to store now, for example: E:\MySQL5.6Data
Copy data files:
Copy the "data files and subdirectories" in the original data directory to the E:\MySQL5.6Data directory just created; pay attention to your original data files Do not copy the wrong directory and data files. If you have not modified the original directory much, the original directory should look like "..\ProgramData\MySQL\...\data\". Copy the contents of the data directory to in a new directory.
New data file directory authorization
This step is very important. Many students cannot start MySQL because of this, and only have 1067 errors.
Right-click the new directory E:\MySQL5.6Data, select the "Security" tab, and grant full control permissions to all the following users and groups (Note: You can do this on the test machine, if it is a production environment , you need to try one by one until the 1067 error is not reported).
Modify the my.ini file
Many articles on the Internet say that my.ini is in the MySQL installation directory. Many people may find that my.ini does not exist in that location. File, there is only one my-default.ini file, this file is basically useless.
Non-installation version of MySQL: the my.ini configuration file may be in this directory;
Installation version of MySQL: Most of the my.ini files are in your In the data file directory, if it is not there, you can right-click the MySQL service in the Windows service list, select Properties, and you can see the executable file path in the "General" tab, followed by a --defaultFile parameter. After this parameter The value is the path to your my.ini file.
After finding the my.ini file, open it and modify the value of datadir to a new directory, such as E:\MySQL5.6Data; in most cases, just modify this place, but in order to ensure some "mutation" , you can check whether the change needs to be completed by searching for the original data path keywords (such as the original drive letter).
Save after modification. If you are installing the MySQL version and the my.ini file is in the original data file directory, you still need to do two things:
1. Copy the my.ini file to the MySQL installation directory or the new data file directory;
2. Open "Run" in windows r, enter regedit and press Enter to open the registry, HKEY_LOCAL_MACHINE-->SYSTEM--> ;CurrentControlSet-->Find the MySQL service key under services, and then modify its ImagePath attribute value to the new absolute path of the my.ini file.
Start MySQL
In the MySQL service list, start MySQL.
More related free learning recommendations: mysql tutorial(Video)
The above is the detailed content of How to modify the MySQL data directory under Windows. For more information, please follow other related articles on the PHP Chinese website!

c盘的users是用户文件夹,主要存放用户的各项配置文件。users文件夹是windows系统的重要文件夹,不能随意删除;它保存了很多用户信息,一旦删除会造成数据丢失,严重的话会导致系统无法启动。

启动任务管理器的三个快捷键是:1、“Ctrl+Shift+Esc”,可直接打开任务管理器;2、“Ctrl+Alt+Delete”,会进入“安全选项”的锁定界面,选择“任务管理器”,即可以打开任务管理器;3、“Win+R”,会打开“运行”窗口,输入“taskmgr”命令,点击“确定”即可调出任务管理器。

PIN码是Windows系统为了方便用户本地登录而独立于window账户密码的快捷登录密码,是Windows系统新添加的一套本地密码策略;在用户登陆了Microsoft账户后就可以设置PIN来代替账户密码,不仅提高安全性,而且也可以让很多和账户相关的操作变得更加方便。PIN码只能通过本机登录,无法远程使用,所以不用担心PIN码被盗。

对于刚刚开始使用PHP的用户来说,如果在Windows操作系统中遇到了“php不是内部或外部命令”的问题,可能会感到困惑。这个错误通常是由于系统无法识别PHP的路径导致的。在本文中,我将为您提供一些可能会导致这个问题的原因和解决方法,以帮助您快速解决这个问题。

win10自带的onenote是UWP版本;onenote是一套用于自由形式的信息获取以及多用户协作工具,而UWP版本是“Universal Windows Platform”的简称,表示windows通用应用平台,不是为特定的终端设计的,而是针对使用windows系统的各种平台。

windows操作系统的特点包括:1、图形界面;直观高效的面向对象的图形用户界面,易学易用。2、多任务;允许用户同时运行多个应用程序,或在一个程序中同时做几件事情。3、即插即用。4、出色的多媒体功能。5、对内存的自动化管理。

因为win10系统是不自带扫雷游戏的,需要用户自行手动安装。安装步骤:1、点击打开“开始菜单”;2、在打开的菜单中,找到“Microsoft Store”应用商店,并点击进入;3、在应用商店主页的搜索框中,搜索“minesweeper”;4、在搜索结果中,点击选择需要下载的“扫雷”游戏;5、点击“获取”按钮,等待获取完毕后自动完成安装游戏即可。

在windows中鼠标指针呈四箭头时一般表示选中对象可以上、下、左、右移动。在Windows中鼠标指针首次用不同的指针来表示不同的状态,如系统忙、移动中、拖放中;在Windows中使用的鼠标指针文件还被称为“光标文件”或“动态光标文件”。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Notepad++7.3.1
Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version
God-level code editing software (SublimeText3)
