change user to root su -
yum install mysql
yum install mysql-server
yum install mysql-devel
after installation.. files will be available on /var/lib/mysql
and user group called mysql will be created.. change the group ownership and permissions
yum install mysql
yum install mysql-server
yum install mysql-devel
after installation.. files will be available on /var/lib/mysql
and user group called mysql will be created.. change the group ownership and permissions
chgrp -R mysql /var/lib/mysql/
chmod -R 770 /var/lib/mysql/
the next step is not necessary.. add the service in desired runlevel
chmod -R 770 /var/lib/mysql/
the next step is not necessary.. add the service in desired runlevel
chkconfig | grep mysqld
chkconfig mysqld on
chkconfig mysqld on
start the service service mysqld start
set the passwords. (note single quote is important)
mysqladmin -u root password 'new-password'
mysqladmin -u root -h hostname password 'new-password'
mysqladmin -u root -h hostname password 'new-password'
login to mysql mysql -u root -p
show databases;
use mysql;
show tables;
describe user;
select user, password, host from user;
update user set password = '******' where user = 'root' and host = '127.0.0.1';
No comments:
Post a Comment