Connect mysql from Remote machine


About author  I am Java professional, working on Enterprise Java from last 8 years. Read more from this author


In mysql user need permission based on IP to connect mysql server. In default installation of mysql it doesn’t permit root to connect from remote machine
Using the following command, we set permission for connecting server from remote machines

shell> mysql –user=root mysql
mysql>GRANT ALL PRIVILEGES ON *.* TO monty@localhost IDENTIFIED BY ‘some_pass’ WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@”%” IDENTIFIED BY ‘some_pass’ WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO admin@localhost;
mysql> GRANT USAGE ON *.* TO dummy@localhost;

Leave a Reply