Import .frm and .opt files to MySQL

前端 未结 4 786
-上瘾入骨i
-上瘾入骨i 2020-12-25 13:27

I am using MySQL 5.5.1.1 downloaded and installed from : http://dev.mysql.com/downloads/

I want to import .frm and .opt database files from my local machine to my my

4条回答
  •  情歌与酒
    2020-12-25 14:00

    I did a mysql import using the files on xampp. I have very many databases so I did not want to go through the mysqldump route. The process was:

    1. Install the new xampp, but do not enable the services
    2. Update my.ini to include any custom settings I had on the previous install.
    3. Confirm that mysql is starting successfully
    4. Copy over all the database folders (inside the data folder) from the old install with the exception of mysql, phpmyadmin and webauth.
    5. Confirm that mysql is starting successfully
    6. Copy over ib_logfile0, ib_logfile1 and ibdata1. Rename the files first, do not overwrite just in case something goes wrong.
    7. Confirm that mysql is starting successfully
    8. Copy over the following files from the data/mysql folder: db.frm, db.MYD, db.MYI, user.frm, user.MYD, user.MYI. Do not overwrite the new ones just in case it doesn't work.
    9. Confirm that mysql is starting successfully

    At the end of the process I had mysql working perfectly with all my databases and users intact.

提交回复
热议问题