Difference between revisions of "MySQL"

From Wasya Wiki
Jump to: navigation, search
(Created page with " Don't forget to change bind_ip in /etc/mysql/my.cfg to 0.0.0.0! Allow root to login from anywhere. From: http://stackoverflow.com/questions/11223235/mysql-root-access-from-a...")
 
Line 4: Line 4:
 
Allow root to login from anywhere. From: http://stackoverflow.com/questions/11223235/mysql-root-access-from-all-hosts
 
Allow root to login from anywhere. From: http://stackoverflow.com/questions/11223235/mysql-root-access-from-all-hosts
  
 +
CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
 
  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
 
  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;

Revision as of 20:53, 9 January 2016

Don't forget to change bind_ip in /etc/mysql/my.cfg to 0.0.0.0!

Allow root to login from anywhere. From: http://stackoverflow.com/questions/11223235/mysql-root-access-from-all-hosts

CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;