These simple steps install and start MySQL database server on Fedora 20:
- Install the package “community-mysql-server”: # yum -y install community-mysql-server
- Start the daemon service: # systemctl start mysqld.service
- Enable the daemon service: # systemctl enable mysqld.service
- Connect to MySQL: # mysql -u root. Type Enter
- Set the root password: mysql> set password for root@localhost=password(‘password’);
You can replace the localhost with your domain or IP address.
- Delete anonymous users: mysql> delete from mysql.user where user=”;
- mysql> exit
If you forgot the root password, do these:
- # mysqld_safe –skip-grant-tables &
- mysql> use mysql;
mysql> update user set password=PASSWORD(“New-Password”) where User=’root’;
mysql> flush privileges;
mysql> quit - # systemctl stop mysqld
- # systemctl start mysqld
- # mysql -u root -p