[opensuse] MySQL / MariaDB advice
I have a web site that used a MySQL database for it's data. This has been running on openSUSE 12.3. I am moving it to Tumbleweed. I would prefer, if possible, just to copy the existing MySQL stuff (var/lib/mysql) to the new server and run MySQL. I am hoping to eliminate this web site, so I don't really want to invest too much time. So I wonder, can I just: 1. Copy /var/lib/mysql from the old to the new server 2. Install and enable mysql-community-server I think that looks optimistic. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dne 12.1.2017 v 09:07 Roger Oberholtzer napsal(a):
I have a web site that used a MySQL database for it's data. This has been running on openSUSE 12.3. I am moving it to Tumbleweed. I would prefer, if possible, just to copy the existing MySQL stuff (var/lib/mysql) to the new server and run MySQL. I am hoping to eliminate this web site, so I don't really want to invest too much time. So I wonder, can I just:
1. Copy /var/lib/mysql from the old to the new server
I'd prefer export/import.
2. Install and enable mysql-community-server
And check Your configuration in /etc/my.cnf and php.ini
I think that looks optimistic.
It should be OK, I think. -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/ https://trapa.cz/cs
On 12.01.2017 09:07, Roger Oberholtzer wrote:
I have a web site that used a MySQL database for it's data. This has been running on openSUSE 12.3. I am moving it to Tumbleweed. I would prefer, if possible, just to copy the existing MySQL stuff (var/lib/mysql) to the new server and run MySQL. I am hoping to eliminate this web site, so I don't really want to invest too much time. So I wonder, can I just:
1. Copy /var/lib/mysql from the old to the new server 2. Install and enable mysql-community-server
I think that looks optimistic.
depending on the different MySQL versions a copy & paste could work? to make things sure a mysqldump and later import would be the preferred way: mysqldump -uUser -pPass --opt somedatabase > /tmp/somedatabase.sql mysql -uUser -pPass somedatabase < /tmp/somedatabase.sql best of luck ;) Becki --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 12.01.2017 um 11:03 schrieb Admin Beckspaced:
On 12.01.2017 09:07, Roger Oberholtzer wrote:
I have a web site that used a MySQL database for it's data. This has been running on openSUSE 12.3. I am moving it to Tumbleweed. I would prefer, if possible, just to copy the existing MySQL stuff (var/lib/mysql) to the new server and run MySQL. I am hoping to eliminate this web site, so I don't really want to invest too much time. So I wonder, can I just:
1. Copy /var/lib/mysql from the old to the new server 2. Install and enable mysql-community-server
I think that looks optimistic.
depending on the different MySQL versions a copy & paste could work?
to make things sure a mysqldump and later import would be the preferred way:
mysqldump -uUser -pPass --opt somedatabase > /tmp/somedatabase.sql mysql -uUser -pPass somedatabase < /tmp/somedatabase.sql
best of luck ;) Becki
But mysqldump does not copy users, passwords and permissions. I would try to copy /var/lib/mysql and check changelogs and messages if you have to run a upgrade procedure. If you really have to export/import the data, then you can use tools like mysqluserclone to copy the mysql users: http://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqluserclone.html
On Thu, Jan 12, 2017 at 2:55 PM, Florian Gleixner <flo@redflo.de> wrote:
Am 12.01.2017 um 11:03 schrieb Admin Beckspaced:
On 12.01.2017 09:07, Roger Oberholtzer wrote:
I have a web site that used a MySQL database for it's data. This has been running on openSUSE 12.3. I am moving it to Tumbleweed. I would prefer, if possible, just to copy the existing MySQL stuff (var/lib/mysql) to the new server and run MySQL. I am hoping to eliminate this web site, so I don't really want to invest too much time. So I wonder, can I just:
1. Copy /var/lib/mysql from the old to the new server 2. Install and enable mysql-community-server
I think that looks optimistic.
depending on the different MySQL versions a copy & paste could work?
to make things sure a mysqldump and later import would be the preferred way:
mysqldump -uUser -pPass --opt somedatabase > /tmp/somedatabase.sql mysql -uUser -pPass somedatabase < /tmp/somedatabase.sql
best of luck ;) Becki
But mysqldump does not copy users, passwords and permissions. I would try to copy /var/lib/mysql and check changelogs and messages if you have to run a upgrade procedure.
If you really have to export/import the data, then you can use tools like mysqluserclone to copy the mysql users:
http://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqluserclone.html
I copied the files (making sure they belonged to mysql). I think things started okay. It seems the web site is functioning. At least as well as it ever did. Now to phase it out. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 12 Jan 2017 14:55:45 +0100 Florian Gleixner <flo@redflo.de> wrote:
But mysqldump does not copy users, passwords and permissions.
Why do you say this? mysqldump will copy the mysql database containing the users and permissions, will it not? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12.01.2017 18:16, Dave Howorth wrote:
On Thu, 12 Jan 2017 14:55:45 +0100 Florian Gleixner <flo@redflo.de> wrote:
But mysqldump does not copy users, passwords and permissions.
Why do you say this? mysqldump will copy the mysql database containing the users and permissions, will it not?
mysqldump copies contents of user databases. You can try to copy the mysql database that contains users and permissions, but the schema may change from one mysql version to the next, so you may happen to break the mysql database and so make the rdbms unusable. I did never try this, i always copied user databases with mysqldump and always had to fix users and permissions.
Copying the files direct did seem to work. MySQL started and seemed to serve the tables. The only problem I have with this web site is probably related to PHP. One aspect of the site does not work. It is related to a software download thing. I don't think it is related to SQL. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Admin Beckspaced
-
Dave Howorth
-
Florian Gleixner
-
Roger Oberholtzer
-
Vojtěch Zeisek