forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Feature Request: Export User
- This topic is empty.
-
AuthorPosts
-
-
August 30, 2006 at 8:52 am #9819larsenParticipant
Hello,
it would be nice to have a tool to export mysql users as sql statements.
The exported file should look like:
CREATE USER 'myname'@'%' IDENTIFIED BY 'whatever';
GRANT ALL ON database1.* TO 'myname'@'%';
This should be more elegant than exporting the mysql table, shouldn´t it?
Lars
-
August 30, 2006 at 10:17 am #22186peterlaursenParticipant
you can do yourself like this:
1) create table test.user select * from mysql.user where user = '****' and host = '****';
2) export table test.user as 'data only' SQL
3) import wherever you want to use it.
4) do not forget to 'flush privileges' !!!
But this wasy of manipulating users is not supported by MySQL! And when working across diffrent MySQL versions be aware that the user table is different
I do NOT support a functionality that just does 'GRANT ALL'all the time …
What is your use of such functionality?
-
August 30, 2006 at 10:49 am #22187larsenParticipantpeterlaursen wrote on Aug 30 2006, 10:17 AM:But this wasy of manipulating users is not supported by MySQL! And when working across diffrent MySQL versions be aware that the user table is different
that´s the reason why I would prefer the other solution
Quote:I do NOT support a functionality that just does 'GRANT ALL' …Sure, just an example.
Quote:What is your use of such functionality?Developing an application or website on another machine than the production system. This way it would be easier to create (copy) the appropriate user and privileges on the production system.
And yes, I´m lazy 😉
-
August 31, 2006 at 7:00 am #22188TomBezMemberlarsen wrote on Aug 30 2006, 12:49 PM:Developing an application or website on another machine than the production system. This way it would be easier to create (copy) the appropriate user and privileges on the production system.
And what would happen, if you have tables in production that you don't have in developement and vice versa? getting a permission error afterwards would make most people think, that this is a sqlyog bug.
btw: at least and passwords should differ from developement to production 😉
-
-
AuthorPosts
- You must be logged in to reply to this topic.