Hi! Here I provide a brief guide to enable using mysql database on PyCharm 2019.1.2 (community edition).
Step 1. Create mysql database.
Kali linux comes with mysql pre-installed.
- Start mysql server.
Open terminal and type,
:~# service mysql start :~# mysql -u root -p // provide password when prompt
- Give privilege to ‘user’@localhost.
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';
Step 2. Install DB Navigator on PyCharm IDE.
- Select project -> File –> Settings –> Plugins
- Search “DB Navigator”
- Install package
Step 3. Connect the mysql database with PyCharm.
- Press “+” on “DB Browser” –> select ‘MySQL’
- In DB Navigator settings, select “+” again in “Connection” tab.
- Fill the form with required information.
- For authentication: select “user/password”, and provide the ‘<username>’ and ‘<password>’ provided during grant privilege above.
- Test Connection.
Cheers ! 🙂