Securing privilege table structure

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
visionmaster
Forum Contributor
Posts: 139
Joined: Wed Jul 14, 2004 4:06 am

Securing privilege table structure

Post by visionmaster »

Hello,

I have some questions in securing MySQL and its databases.

1. I don't only want to secure databases using mysqldump, I really want to mirror MySQL in a whole. Just for cases a fatal error happens when configuring a running database and I have to get MySQL back running quickly. How do I do that?


2. I want to insert a new user, following warning is displayed:

Warning: Your privilege table structure seem to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

I'm afraid as soon as I add an additional user, the database will not work. Can I just mysqldump the table 'mysql' and play back the dump if any problems occur. Or will that make problems regarding the encrypted passwords in any way?

Running mysql_fix_privilege_tables also seems very suspect to me...

Thanks for any help!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Looks like you may have updated from MySQL 3.x to 4.x - if so then you do need to run the fix script to ensure that your privilege table is in the new format.

Mac
visionmaster
Forum Contributor
Posts: 139
Joined: Wed Jul 14, 2004 4:06 am

Post by visionmaster »

Thanks for your response. So, can I backup the database 'mysql' before I do any fatal experementing? Would appreciate some detailed answers to my above questions.

Thanks a lot!
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

how hard is it to read the mysql manual?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

The fix script shouldn't be fatal, but there's no reason why you can't backup the mysql database beforehand as you would do any other backup. Best source of info on this is, as timvw pointed out, the MySQL manual.

Mac
Post Reply