Python Connect To MySQL Database With MySQL Connector & PyMySQL Example

When you want to connect to the MySQL database in Python code, you can use both the mysql-connector-python MySQL driver and PyMySQL. The mysql-connector-python MySQL driver is a MySQL server built-in driver and the PyMySQL is a third-party library. All the two MySQL python libraries provide classes for you to get MySQL database connection, execute insert, delete,

Python Connect To MySQL Database With MySQL Connector & PyMySQL Example Read More »

How To Resolve Access Denied For User ‘root’@’localhost’ (using Password: Yes) When Connect MySQL Database

When I connect MySQL databases in source code, such as Java code or Python code. I encounter an error which I do not meet when I use MySQL client tool software to connect it. The error message is Access Denied For User ‘root’@’localhost’ (using Password: Yes). To resolve this issue is not hard, this example

How To Resolve Access Denied For User ‘root’@’localhost’ (using Password: Yes) When Connect MySQL Database Read More »

Django Custom Login Page Use login_required Decorator

We have implemented a register/login system that uses Django’s built-in auth module in Django User Registration And Login Use Built-in Authorization Example. But when you browse any URL other than the home page ( login page ), for example, http://127.0.0.1:8000/user/register_success/, you will find that even you do not log in, the target page content will

Django Custom Login Page Use login_required Decorator Read More »