Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Feature Request: Export User

forums forums SQLyog SQLyog: Bugs / Feature Requests Feature Request: Export User

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9819
      larsen
      Participant

      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

    • #22186
      peterlaursen
      Participant

      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?

    • #22187
      larsen
      Participant
      peterlaursen 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 😉

    • #22188
      TomBez
      Member
      larsen 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 😉

Viewing 3 reply threads
  • You must be logged in to reply to this topic.