Wednesday, May 15, 2013

Install and Configure MySQL


Login as mysql

$ mysql_install_db
$ cd /usr ; /usr/bin/mysqld_safe &
$ /usr/bin/mysqladmin -u root password '<password>'
$ mysql --user=root --password=<password> mysql

the below command recommended by mysql_install_db doesn't work,  you'd better run above command and
below command doesn't work
$ /usr/bin/mysqladmin -u root -h cacti.goweekend.ca password '<password>'

user below commands instead
$ mysql --user=root --password=<password> mysql


create user 'root'@'cacti.goweekend.ca' identified by '<password>';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'cacti.goweekend.ca' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO root@cacti.goweekend.ca WITH GRANT OPTION;

FLUSH PRIVILEGES;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'cacti.goweekend.ca' WITH GRANT OPTION;

No comments:

Post a Comment