Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    20

    Unanswered: creating user in mysql through shell script

    Hi !

    I am trying to create a user in mysql through shell script. How to create it using shell script.Thanks in advance.

    Bye
    Prasanthi

  2. #2
    Join Date
    Dec 2003
    Posts
    4
    #!/bin/bash

    mysql --user=root mysql
    GRANT ALL PRIVILEGES ON *.* TO $1@localhost;

    ./script.sh john

    will create the mysql user, john without a password and only will accept local connections for that user name. if you'd like it to be more specific, let me know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •