GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Give remote user MySQL root access , How ?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Give remote user MySQL root access , How ?

    Hello Everyone,

    Since now i am using percona mysql replication for my replication services, My users are not able to gain mysql root access from remote servers.

    I have tried the usual steps, But they dont work

    Can any body help me with the steps how can i achieve the same ?

    Thank you

  • #2
    http://www.catb.org/esr/faqs/smart-questions.html

    Comment


    • #3
      Hello gmouse,

      My apologies for what ever was inappropriate that you have pointed out in my post above !!

      To let you know what i have done so far and which is not working is as follows :-

      I am trying to give "mysql" root access to the ip '10.222.1.140'

      After logging on to 10.222.1.140 i issue these commands in mysql mode :-


      GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 's0meP@$$@0rd' WITH GRANT OPTION;GRANT ALL ON *.* to root@'%' IDENTIFIED BY 's0meP@$$@0rd'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.222.1.140'IDENTIFIED BY PASSWORD 's0meP@$$@0rd' WITH GRANT OPTION;GRANT ALL PRIVILEGES ON *.* TO root@'localhost' IDENTIFIED BY 's0meP@$$@0rd';GRANT ALL PRIVILEGES ON *.* TO root@'127.0.0.1' IDENTIFIED BY 's0meP@$$@0rd';GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 's0meP@$$@0rd' WITH GRANT OPTION;


      All the above statements that i have issued on my server have failed to allow me into the server from remote servers AND yes this is for local network !!!


      root@rack02 ~ # mysql -uroot@10.222.1.140 -pEnter password:ERROR 1045 (28000): Access denied for user 'root@10.222.1.14'@'localhost' (using password: YES)



      I have made sure my FIREWALL is Disabled and i have also FLUSH PRIVILEGES after every statement above.

      But nothing works

      Kindly let me know what could be missing ?

      Comment


      • #4
        You are combining -u and -h for the mysql command. Try this:

        mysql -u root -h 10.222.1.140

        Your current command uses the username "root@10.222.1.140" to connect to the mysql server on rack02.

        See, it is much easier to spot these mistakes when you provide all info

        Comment


        • #5
          Appreciate your turn around "gmouse"

          I would like to correct a little misunderstanding here....

          I am trying to connect FROM "rack02" TO the ip "10.222.1.140" and no matter how i try to connect, i get this error :-


          root@rack02 ~ # mysql root@10.222.1.140 -pEnter password:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)root@rack02 ~ # mysql -u root -h 10.222.1.140ERROR 1045 (28000): Access denied for user 'root'@'10.222.1.218' (using password: YES)


          Please suggest a recourse.

          Comment


          • #6
            Try this:
            mysql -u root -h 10.222.1.140 -p
            and then enter the correct password.

            If that does not work, then check whether the user exists in the mysql.user table and check the password again.

            Comment


            • #7
              pheww....

              It finally worked

              But i am not sure , why wasn't it working all this while, We did not nothing this time except adding "-p" for password in the end of the connecting statement.

              Will appreciate if you could clarify.

              Thank you

              Comment


              • #8
                Without -p, it uses the default settings from my.cnf (on rack02) that may contain a password.

                Comment


                • #9
                  Fantastic, thank you for the clarification

                  One quick query, Since i was trying to establish this mysql root connection from my master server to my replication slave server, I had entered the login details of the slave's mysql login credentials in the my.cnf of the master.

                  Can you let me know do i need to have those details there ?

                  Thank you for everything so far

                  Comment


                  • #10
                    No, they are not necessary in my.cnf.

                    Comment


                    • #11
                      Thank you for the clarification,

                      I'll get back to you if i have any further doubts

                      Thank you

                      Comment

                      Working...
                      X