MYSQL Data Directory Lookup and how to migrate

Source: Internet
Author: User

MySQL database installed successfully, but found in the MySQL installation directory of the data directory does not have a new database? So how do you find the real data directory? Below the 3A network small money to teach you today how to find the real data directory and migrated out. (Welcome you crossing more to communicate with younger brother, the younger brother Buckle: Qi One II three of the 0 II)

Find Method:
1. Method One: Find the Mysql.ini file
Search DataDir keyword, find original path configuration and Basedir inconsistency
Datadir= "C:/Documents and Settings/all users/application data/mysql/mysql Server 5.5/data/"

2. Method two: SQL statement
There is a statement to find:
Show variables like ' DataDir '
The original is really not under the installation directory, unexpectedly in:
C:\Documents and Settings\All Users\Application Data\mysql\mysql Server 5.5\data directory below.
Find the real date directory, we will migrate here.

Migration method:
1. Stop the MySQL service first;
2. Copy the previous data directory to the target data folder and overwrite it;
3. Restart the MySQL service.

MYSQL Data Directory Lookup and how to migrate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.