Home > Database > Mysql Tutorial > How to modify the mysql service path

How to modify the mysql service path

WBOY
Release: 2022-05-27 10:12:10
Original
7801 people have browsed it

Modification method: 1. Use regedit to find the mysql registry and modify the path of the ImagePath value to modify the mysql executable file path; 2. Modify the datadir value in the "my.ini" file and restart the mysql service. , you can modify the file path of the mysql database.

How to modify the mysql service path

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

How to modify the mysql service path

1. How to change the executable file path of MySQL in the service:

1. Open CMD and enter regedit, open Registry Editor

2, find the mysql registry according to the path

Find the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL80,

The service name on my computer is: MySQL80. You can search it according to your actual situation.

Modify the ImagePath value to the correct path.

How to modify the mysql service path

How to modify the mysql service path

2. How to change the MYSQL database file path:

Start--Run --services.msc--Find the MySql service and stop the default installation location:

C:\Program Files\MySQL\MySQL Server 5.0 Then, modify the my.ini file.

Enter the MySQL installation directory, find my.ini, and modify the value of datadir.

datadir="D:/Program Files/MySQL/MySQL Server 5.0/Data/" -- Just modify this value

Finally, start the MySQL service.

Start--Run--services.msc--Find the MySql service and start it

Recommended learning: mysql video tutorial

The above is the detailed content of How to modify the mysql service path. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template