Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2017-11-08, 01:43:59

Author Topic: how to move mysql database from server to another  (Read 3295 times)

0 Members and 1 Guest are viewing this topic.

Offline letux

  • Valuable Member
  • *
  • Posts: 129
  • Karma: +0/-0
    • View Profile
how to move mysql database from server to another
« on: 2014-04-15, 10:24:23 »
hey ,

my database is crached and i can't fix it
i tallked about it in this topic kloxo-mr-technical-helpsmysql-can27t-start.html

now i have new VPS and i wont move database from old server to the new .
# ! on old server mysql not working , phpmyadmin now working .

i need move database fiels . What are the files that I moved ?

thanx

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: how to move mysql database from server to another
« Reply #1 on: 2014-04-15, 10:42:18 »
If your old vps not using innodb as mysql storage-engine, you are lucky person.

Just backup all directories inside '/var/lib/mysql' except mysql, performance_schema and test.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Kloxo-DR

  • Senior Member
  • *
  • Posts: 239
  • Karma: +3/-9
    • View Profile
Re: how to move mysql database from server to another
« Reply #2 on: 2014-04-15, 11:02:33 »
Hi,
now i have new VPS and i wont move database from old server to the new .
# ! on old server mysql not working , phpmyadmin now working .

Copy all files (except *.db) under /var/lib/mysql/db_name from old server to /var/lib/mysql/db_name under new server.

With this, you are not importing or dumping BUT REPLACING OLD WITH NEW OR SAVING INTO NEW all the database files for tables.

Then your entire database will be in the new server.

You must creat the database with the same name under the same client. If you want to change the client and/or database, then first create the new database in Kloxo-MR control panel and save all *files like MYI, etc under /var/lib/mysql/db_name FROM OLD TO NEW!

Offline letux

  • Valuable Member
  • *
  • Posts: 129
  • Karma: +0/-0
    • View Profile
Re: how to move mysql database from server to another
« Reply #3 on: 2014-04-15, 11:27:48 »
H3 h3 h3 xD
I'am used innodb on old server xD
What I do now !

Offline Kloxo-DR

  • Senior Member
  • *
  • Posts: 239
  • Karma: +3/-9
    • View Profile
Re: how to move mysql database from server to another
« Reply #4 on: 2014-04-15, 11:45:24 »
Hi,

Use and change:

sh /script/mysql-convert --engine=MyISAM
sh /script/mysql-convert --engine=InnoDB

to have both, the old and new, database engines the same. Better convert to InnoDB--->MyISAM before.

Before doing anything anywhere, make a copy of /var/lib/mysql/* - for an extra copy of all directories - of databases under it in case anything goes wrong. then you can play with such conversions.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,944
  • Karma: +1/-0
    • View Profile
Re: how to move mysql database from server to another
« Reply #5 on: 2014-04-15, 12:27:21 »
Make sure /etc/my.cnf is the same.

Offline Kloxo-DR

  • Senior Member
  • *
  • Posts: 239
  • Karma: +3/-9
    • View Profile
Re: how to move mysql database from server to another
« Reply #6 on: 2014-04-15, 14:17:31 »
Good suggestion Spacedust!

For that you must also make sure that mysql version (mysql or mysql55) of both the servers is the same as well, if you want to - also - make the match of my.cnf.

Otherwise, in a normal case, all the files of mysql version 5 may most likely function under both versions.

Offline letux

  • Valuable Member
  • *
  • Posts: 129
  • Karma: +0/-0
    • View Profile
Re: how to move mysql database from server to another
« Reply #7 on: 2014-04-15, 23:52:41 »
Hi,

Use and change:

sh /script/mysql-convert --engine=MyISAM
sh /script/mysql-convert --engine=InnoDB

to have both, the old and new, database engines the same. Better convert to InnoDB--->MyISAM before.

Before doing anything anywhere, make a copy of /var/lib/mysql/* - for an extra copy of all directories - of databases under it in case anything goes wrong. then you can play with such conversions.


' sh /script/mysql-convert --engine=MyISAM ' on old server not give me output .

can i sent ip and root password to you in message for check it ? PLZ :/


Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: how to move mysql database from server to another
« Reply #8 on: 2014-04-16, 03:24:48 »
Convert will be trouble if mysql not work (let say not able to start/restart) or any trouble in php52s/php53s itself. It's normal.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Kloxo-DR

  • Senior Member
  • *
  • Posts: 239
  • Karma: +3/-9
    • View Profile
Re: how to move mysql database from server to another
« Reply #9 on: 2014-04-16, 07:05:02 »
Hi,

I just checked your earlier messages and found that your kloxomr and my.cnf is not proper.

Update kloxomr to the latest version with:

yum update kloxomr
sh /script/cleanup

The latest version of kloxomr may make a change.
If the problem remains, send me a PM with root details.


 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.039 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM