This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Restore mysql database backup to new Sentora
#3
RE: Restore mysql database backup to new Sentora
(09-05-2019, 09:38 PM)kevwebbie Wrote: Anyone have any input on how I can do this? ANY help would be appreciated.

Okay, so I've managed to get this far:

(1) Copy the databases from the old server onto the new one into /var/lib/mysq/ by using:
$scp -r /var/lib/mysql/databasename root@serverip:/var/lib/mysql/  <-- Done on the old corrupt server onto the new server.
Then

(2) I changed privileges on the database to give mysql full access to same by logging into mysql:
$ mysql -u root -p *pass*
mysql> use database name;
mysql> show tables; <-- shows error due to privileges
mysql> GRANT ALL PRIVILEGES ON mydatabase.* TO 'mysql';
mysql> exit;
$ sudo service mysql restart
- Log into mysql once more
$ mysql -u root -p *pass*
mysql> use database name;
mysql> show tables; <-- Now mysql will show the tables

(3) So when I log into Sentora, I can log in to phpmyadmin as "root" (with root pass) and I will can the databases I've copied to /var/lib/mysql. I can also see the tables of the databases that I've granted permissions to mysql but not those of root.

Now I am left with attempting to view the databases within the "zadmin" login of my Sentora installation. I presume this will be done with the actual Sentora database? Maybe I need to grant privileges to the "zadmin" dbase user?

I'm hoping to get one of you Sentora exerts to answer the rest of my question maybe?


Update on this
Okay, I should have seen this earlier (Faceplant!). So now that I can connect to the databases via phpmyadmin in Sentora by logging in as root, I'm just going to export the databases to my local computer and then import them back into Sentora via phpmyadmin. Boom! I'm done! Simples!

Maybe someone else can use this info if they get locked out of a server or it gets corrupt. Smile
Reply
Thanks given by: TGates


Messages In This Thread
RE: Restore mysql database backup to new Sentora - by kevwebbie - 09-06-2019, 12:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 2 ,975 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,144 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 2 ,552 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)