Post History
#2: Post edited
- You forgot to turn on `mysql`.
- ```bash
- sudo systemctl enable mysql
- ```
- `systemctl` doesn't work for every distro. If your system doesn't have `systemctl` then, you have to use `service`
- ```bash
sudo service enable mysql- ```
- Sometimes only enabling mysql service isn't helpful. Then, you have to login to mysql once.
- ```bash
- mysql -u root -p
- ```
- It will request you to enter password. Then, enter your password. Then, you can exit if you want. Then, try creating database again.
- ```bash
- rails db:create
- ```
- You forgot to turn on `mysql`.
- ```bash
- sudo systemctl enable mysql
- ```
- `systemctl` doesn't work for every distro. If your system doesn't have `systemctl` then, you have to use `service`
- ```bash
- sudo service mysql enable
- ```
- Sometimes only enabling mysql service isn't helpful. Then, you have to login to mysql once.
- ```bash
- mysql -u root -p
- ```
- It will request you to enter password. Then, enter your password. Then, you can exit if you want. Then, try creating database again.
- ```bash
- rails db:create
- ```
#1: Initial revision
You forgot to turn on `mysql`. ```bash sudo systemctl enable mysql ``` `systemctl` doesn't work for every distro. If your system doesn't have `systemctl` then, you have to use `service` ```bash sudo service enable mysql ``` Sometimes only enabling mysql service isn't helpful. Then, you have to login to mysql once. ```bash mysql -u root -p ``` It will request you to enter password. Then, enter your password. Then, you can exit if you want. Then, try creating database again. ```bash rails db:create ```