[英]django could not find database in ubuntu
In my settings I have: 在我的设置中,我有:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'my_database',
'USER': 'username',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
}
} }
I am using virtual environment and I have used MySQL-python. 我正在使用虚拟环境,并且已经使用MySQL-python。 I want to deploy my website and in my control panel I have a place where I have to put my database.
我想部署我的网站,并且在控制面板中有一个地方必须放置数据库。 I want to put my database in database section of my control panel.
我想将数据库放在控制面板的数据库部分。 I am new to ubuntu and I dont know where I can find this database so that I can put it in there...
我是ubuntu的新手,我不知道在哪里可以找到此数据库,以便可以将其放在那里。
Can anyone tell me where can I inspect and find my database?? 谁能告诉我在哪里可以检查和找到我的数据库? Also what are the settings to be done while deploying in database ??
另外,在数据库中部署时要进行哪些设置? Really neeeded...
真是太讨厌了...
where can I inspect and find my database?? 在哪里可以检查并找到我的数据库?
mysql -u aaeronn -p aaeronn09
Then list all database using 然后使用列出所有数据库
mysql> show databases;
Where you want to deploy ? 您想在哪里部署? please see this link for deployment
请查看此链接进行部署
if your looking to copy your database you need to: 如果您希望复制数据库,则需要:
mysqldump -uaaeronn -paaeronn09 eclinicnepal > eclinicnepal.sql
then upload that sql file to your production/next machine and do 然后将该sql文件上传到您的生产/下一台机器并执行
mysql -uaaeronn -paaeronn09 eclinicnepal < eclinicnepal.sql
this assumes the production/new machine has the same mysql user and database setup already. 这假设生产/新机器已经具有相同的mysql用户和数据库设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.