omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    mysqldump failed with an error

    Pythonista
    3
    4
    1396
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DavinE
      DavinE last edited by

      Hello Guys,

      I have a Question is it possible to run the mysql dump on Pythonista ?

      i try to use this code:

      subprocess.Popen('mysqldump --user=username --password=passwd --databases mydb > test.sql')
      

      but every time i tried i get this error:

      Traceback (most recent call last):
        File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/UI/Test Ordner/MYSQL/mysqlRequest-CustomerEntries.py", line 139, in <module>
          mysql_data()
        File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/UI/Test Ordner/MYSQL/mysqlRequest-CustomerEntries.py", line 17, in __init__
          self.list_data()
        File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/UI/Test Ordner/MYSQL/mysqlRequest-CustomerEntries.py", line 136, in list_data
          subprocess.Popen('mysqldump --user= username --password= passwd --databases mydb > test.sql')
        File "/var/containers/Bundle/Application/2952696D-C724-455F-8983-F13D0477091A/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/subprocess.py", line 708, in __init__
          restore_signals, start_new_session)
        File "/var/containers/Bundle/Application/2952696D-C724-455F-8983-F13D0477091A/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/subprocess.py", line 1261, in _execute_child
          restore_signals, start_new_session, preexec_fn)
      PermissionError: [Errno 1] Operation not permitted
      

      or do i something wrong ?
      Thanks for your reply!

      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @DavinE last edited by

        @DavinE please read this topic about subprocess in Pythonista.

        1 Reply Last reply Reply Quote 0
        • DavinE
          DavinE last edited by

          @cvp, Thanks for this topic!
          now i need to find another way :D

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by

            You may be able to run the string command that you were trying to Popen, using the commandline in stash.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors