Install MySQL on Ubuntu

Download

wget https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb

Install

sudo dpkg -i mysql-apt-config_0.8.16-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server

Check MySQL status

systemctl status mysql

Create a user

CREATE USER 'my_username'@'%' IDENTIFIED BY 'my_password';

To create a user that can connect from any host, use the '%' wildcard as a host part.

Grand all privileges to a user account on all databases

GRANT ALL PRIVILEGES ON *.* TO 'my_username'@'%';

้‡ๆ–ฐ่ผ‰ๅ…ฅๆฌŠ้™่กจ๏ผš

FLUSH PRIVILEGES;

Last updated

Was this helpful?