In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When creating a simplecmdb project with django under linux, if you use Chinese encoding, you need to use the uft8 character set when creating a mysql database.
CREATE Datase`cmdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
Avoid unnecessary trouble.
If you specify a mysql database, modify the database under settings.py. The default is SQLite database.
ENGINE is the database used, name is the database, and user is the user Password is the password DATABASES = {'default': {' ENGINE': 'django.db.backends.mysql',' NAME': 'cmdb',' USER': 'root',' PASSWORD':', 'HOST':' 127.0.0.1, 'PORT':' 3306,}} LANGUAGE_CODE = 'zh-cn' / / changed to Chinese
[root@web simplecmdb] # yum install-y MySQL-python.i686 / / install mysql module if it is 64-bit, please install 64-bit.
[root@web simplecmdb] # python manage.py syncdb / / django automatically creates data synchronization data
Refer to the official document https://docs.djangoproject.com/en/1.10/topics/install/#database-installation
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.