Django study Notes-environment configuration-mysql configuration

Source: Internet
Author: User
Django learning notes -- environment configuration -- mysql configuration Django

1. install and configure mysql

1. fedroa19 -- Install myusql using yum;

Mysql database (select the matching ferora version ):

Mysql-community-server-5.6.19-1.fc19.x86_64, dependency packages are automatically installed;

Automatic installation includes:

A. download and install the mysql package and its dependent packages;

B. create a mysql user and a mysql group;

C. initialize mysql databases and create basic tables;

In the end, install the following five related packages:

Mysql-community-libs-5.6.19-1.fc19.x86_64

Mysql-community-server-5.6.19-1.fc19.x86_64

Mysql-community-release-fc19-5.noarch

Mysql-community-client-5.6.19-1.fc19.x86_64

Mysql-community-common-5.6.19-1.fc19.x86_64

2. start mysql:

Service mysql restart;

3. by default, no password is configured for the mysql service installed through yum. after the first connection, you need to change the password;

Update user set password = password ("test") where user = 'root ';

Flush privileges;

4. create the relevant database --------- statement.

5. install python connector

Python is used to connect to mysql, and other language connectors are directly installed to facilitate learning and use;

MySQL-python-1.2.3-7.fc19.x86_64 ------------------------ Special connection library for django, import MySQLdb

Mysql-connector-java-5.1.28-1.fc19.noarch

Mysql-community-libs-5.6.19-1.fc19.x86_64

Mysql-connector-python-1.2.2-1.fc19.noarch

Mysql-community-server-5.6.19-1.fc19.x86_64

Mysql-community-release-fc19-5.noarch

Mysql-connector-c ++-1.1.2-1. fc19.x86 _ 64

Mysql-connector-odbc-5.3.2-1.fc19.x86_64

Mysql-community-client-5.6.19-1.fc19.x86_64

Mysql-community-common-5.6.19-1.fc19.x86_64

Python verification:

Import MySQLdb ---------- django needs to use

Import mysql ---- general call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.