Remote database privileges

Discussion in 'Databases' started by asteraki1976, Apr 30, 2014.

  1. #1
    Hi

    If i run both commands on my database server:

    mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'123.456.789.000' IDENTIFIED BY 'password' WITH GRANT OPTION;"

    and

    mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'000.987.654.321' IDENTIFIED BY 'password' WITH GRANT OPTION;"

    The second command will overwrite the first one or not?

    Both remote servers with ip:

    123.456.789.000
    987.654.321.000

    will be able to connect to the sql?

    Thank you
     
    asteraki1976, Apr 30, 2014 IP
  2. asteraki1976

    asteraki1976 Active Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #2
    Anyone please?
     
    asteraki1976, May 1, 2014 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    The second will not overwrite the first. MySQL views each user@address as a unique user so as long as you don't accidentally grant access to the same user@address you're fine.
     
    jestep, May 2, 2014 IP