重装MYSQL(windows)——怎么去旧的数据与新安装吗?Re-installing MYSQL(windows) - How to get to the old data with the new install?
我需要重新安装我的电脑但是我没有考虑出口数据从mysql 5。 我怎么得到数据从旧的安装到新安装,这只是复制数据目录或我必须采取其他步骤去数据吗?
I needed to re-install my computer but I didn't think about exporting the data from mysql 5.
How do I get the data from the old installation into the new installation, is this just copying the data directory or do I have to take other steps to get to the data?
For MyISAM tables you can generally get away with copying them across. (Whilst the server's stopped, obviously.) For InnoDB, it can work, but you'll have to have the same basic block size settings. If you can use the same major version of MySQL and the same my.cnf you stand a good chance of having it work.
Afterwards it's a good idea to ensure the tables are rebuilt (eg. using ALTER TABLE), and make a note to mysqldump properly next time because none of this is supported or guaranteed to work!
(原文：my.cnf <--- what is this and where can I find it ?)bobince的回复:MySQL配置文件。根据MySQL建立你# 39;重新使用它可能会在Windows文件夹(哇!),或者在程序文件 my.ini MySQL。
(原文：The MySQL config file. Depending on what MySQL build you're using it might be in the Windows folder (yuck!), or in Program FilesMySQL as my.ini.)
I would export your data as a sql file from mysql (ie: with phpmyadmin) and then import it into the new installation. Your db should be built and filled with data pretty easily.
You said that you "didn't think about exporting the data". Does that mean you don't have access to the old installation any more?
(原文：Does that mean you don't have access to the old installation any more? I only have access to the files not the mysql install anymore.)
- 我如何创建一个有序列表最常见的子字符串在MySQL varchar列?How can I create an ordered list of the most common substrings inside of my MySQL varchar column?
- 简单随机样本从一个Sql数据库Simple Random Samples from a Sql database
- 查询优化技术?(关闭)Query optimization techniques? [closed]
- 什么最好的方法访问数据库在一个PHP类?What the best way to access the database inside a class in PHP?
- MySqlCommand参数不工作MySqlCommand Parameter not Working
- 重装MYSQL(windows)——怎么去旧的数据与新安装吗?Re-installing MYSQL(windows) - How to get to the old data with the new install?
- 做一个mysql表中的ID auto_increment(事后)make an ID in a mysql table auto_increment (after the fact)
- 我如何升级mysql ?How do I upgrade mysql?
- 做数值主键删除记录在数据库中得到重用未来新记录?Do numerical primary keys of deleted records in a database get reused for future new records?
- 加入两个表没有返回的行Joining two tables without returning unwanted row
- 有干净的清理方式在MySQL重复的条目吗?Is there a clean way of cleaning up duplicate entries in MySQL?