MySQL Forums
Forum List  »  Newbie

Re: Migrating mysql databases into new server
Posted by: Mohammed Yasir Hashmi
Date: October 07, 2016 04:16AM

Hi Philip,
Thanks again for replying.

The current version of mysql is 46178.
Most likely, in new server, it would be 5.7.


As i understand, all users/passwords/privileges are contained in mysql database.
Would backing up mysql database and restoring in higher version be ok or some special considerations are there?

Also I did a test:

a)created a user newuser

mysql> create user 'newuser'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.58 sec)
mysql>
mysql> grant all privileges on test.t to 'newuser'@'localhost';
Query OK, 0 rows affected (0.11 sec)

mysql>
mysql>
mysql> flush privileges;
Query OK, 0 rows affected (0.42 sec)

mysql> drop database mysql;
Query OK, 31 rows affected, 2 warnings (3.76 sec)

After dropping mysql database, I can still login with newuser:


c:\ProgramData\MySQL\MySQL Server 5.7\Data\test>mysql -u newuser -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3577


Why is that so when the database containing all users is dropped or Am I missing something?


Regards,
Yasir

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.