Hi ! Thanks to everyone who replied with advice ! I have phpmyadmin on both servers, yet my concern was following - mysql database users and permissions. This accounting & inventory control system have a truckload of databases (not single, but many), each with many tables, and I have no idea how they relate to each other. So this is why I asked if its possible to move the whole setup as is, by means of copying /var/lib/mysql, in order to avoid any mishaps. Looks like it should work. On 12/6/18 3:00 PM, Knurpht-openSUSE wrote:
Op donderdag 6 december 2018 10:54:27 CET schreef David C. Rankin:
On 12/5/2018 3:22 PM, Andrei Verovski wrote:
Hi !
I have an old accounting system running on SuSE 42.x and MySQL 5.6.
Can I just copy all mysql files from /etc and /var/lib/mysql to another PC with Leap 15 and MySQL 5.6 ?
This MySQL DB have a truckload of tables and developer of the software doesn't offer much help right now.
Thanks in advance. Short answer -- yes you can -- but, there is a better way. Simply use `mysqldump` to dump all tables in the database to a bz2 file and then move the bz2 file the new computer and import the database there.
For example to completely move your "toys" database (example name) you wold
$ mysqldump toys | bzip2 -c > toysbackup.bz2
The move toysbackup.bz2 to your new machine and to restore it, simply do
$ mysql toys < <(bzcat toysbackup.bz2)
Done. This way mysql can catch and handle any table version differences as part of the import rather than trying to sort out table versions in raw /var/lib/mysql files. I did copy /var/lib/mysql files a couple of time during the SuSE 7 days, but since, I just dump to bz2 or xz and move the compressed archive of all tables and the import on the next machine. Another option is to install and use phpmyadmin on both machines. Export the databases on machine 1 to .sql files, import them on machine 2.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org