Installing MySQL Server
- Instructions at < linuxhints.com/install-mysql-linux-mint-ubuntu/>
- First install mysql-server
- Make sure to <sudo mysql-secure-installation> after installing mysql server
Install SQL Connectors for Python
- Three possible options, if one does not work, uninstall it and try another
- pip3 install mysql-connection
- pip3 install mysql-connection-python
- pip3 install mysql-connection-python-rf
Fixing Error
ERROR 1698 (28000): Access denied for user ‘root’@’localhost’
Fix from Laser Codes video of November 2020
- Commands used :
- For installing : sudo apt-get install mysql-server
- To Fix error :
- sudo mysql -u root -p
- use mysql;
- update user set plugin=’mysql_native_password’ where user=’root’;
- flush privileges;
- exit;
- for full video <https://www.youtube.com/watch?v=Q90q0ETuimk>
Deleting a Record in SQL
mysql = “DELETE FROM __table____ WHERE ___item____ = ‘____'”
Deleting a Table in SQL
mysql = “DROP TABLE IF EXISTS __table____”
Getting code used in codemy.com = github.com/flatplanet