RSS

Install Mysql 8 Ubuntu 23

sudo apt install mysql-server

sudo systemctl start mysql
sudo systemctl status mysql


sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password12345';

mysql_secure_installation
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

bind-address            = 127.0.0.1 => rubah ke IP server mysql

sudo systemctl restart mysql

#Login to MySQL console using root
mysql -u root -p

#In the MySQL console, we will create a new user called dhani with password password123
CREATE USER 'dhani'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password123';

#Optionally, we can also grant this new user to access all the databases
GRANT ALL PRIVILEGES ON *.* TO 'dhani'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

#Log in to MySQL Console as root
mysql -u root -p

#Create a new user
CREATE USER 'dhani'@'%' IDENTIFIED WITH mysql_native_password BY 'password123';
GRANT ALL PRIVILEGES ON *.* TO 'dhani'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Posting Komentar