minte9
LearnRemember / UBUNTU



Install MySQL

Install
 
sudo apt install mysql-server
sudo systemctl status mysql
Connection
 
sudo mysql -u root -p (no password)
    OR
sudo mysql

show databases;
    use mysql;
    show tables;    
When root blank password doesn't work.
 
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;

Uninstall MySQL

 
sudo apt-get remove --purge mysql*

sudo apt update     # update the apt package index by typing

sudo apt autoremove    # remove packages not longer required

MySQL client

Install MySQL Workbench
 
apt install mysql-workbench
Localhost connection
 
admin, password
Connect to remote database
 
// Incompatible/nonstandard server version or connection ....
// Continue Anyway






Questions and answers




Install mysql

  • a) sudo apt install mysql-server
  • b) sudo apt-get install mysql

Uninstall mysql & mysql client

  • a) sudo apt-get remove --purge mysql*
  • b) sudo apt-get rm mysql*

Login to mysql

  • a) mysql -u root -p (blank)
  • b) sudo mysql

Check mysql installation

  • a) sudo systemctl status mysql
  • b) sudo mysql status


References