简体   繁体   中英

Update mysql 32bit to 64bit

I have like 10 biiiiiiiiiiiiiig mysql datebases and I have mysql 32bit, It can only use 3gb of ram memory... I need more so I need to update the mysql to 64 bit (the server has 32gb of ram memory). How can I update it without loosing data.

I prefer not to make a backup and reupload it because the datebases are very very big... Is there any alternative?

The OS is centos 5.8

If you have your data in a separate partition, just dont format the partition. You can upgrade your OS and your mysql to 64 bit. then just point your mysql to your data partition.

The internal format of the MySQL database and files does not change based on architecture, but may change slightly depending on MySQL version. You'll want to switch your OS to 64-bit, update to MySQL 5.6 if you're going through all this trouble.

You must make a backup of your data. You won't necessarily need to restore from it, but you cannot just slap on an new OS and assume it'll work out fine.

If your databases are on a separate partition or volume on your system you should be okay to install the OS on the main system partition, reformat that accordingly. Be very careful you don't re-initialize the drive by accident. Once again, this is why backups are essential.

You also don't define what "big" is. For some people that means "a few GB". The database engine also matters. You should be using InnoDB.

  1. Backup the 32 bit database.
  2. Extract the zip distro, not self-installer, for your 64 bit OS (from dev.mysql.com or contract-supplier) to new install directory.
  3. Make a copy of existing 32 bit service's .ini file. Edit it so the port, basedir, datadir, etc are referencing the new, unused values.
  4. Restore 32bit backup using 64 bit software - to New datadir.
  5. Run the 64bit upgrade command (from the shell) to check table integrity and run schema upgrades.
  6. Startup 64bit service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM