Re: Problem in Configuring the database
Rajul, If disk space is a problem why did you install VMWare and SUse - it should be easier to run MySQL directly on Windows. If you are using a viurtual machine then the VMWare installation, SUSE and then MySQL is going to take a lot more space. At this point I would use SQLite just to get started - it has all the features that you would find in a MySQL installation and is great for development work - I do my development on Windows XP with SQLite then deploy to a linux box runing PostgreSQL with no problems at all. Using linux and a production level database is not necessary to run Django locally. That would eliminate all your problems in one go and allow you to get started with your first project. After that you can try MySQL once you are more familiar with Django and understand you needs better. Regards, Stuart -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem in Configuring the database
On 7 May 2011 16:44, rahul rajwrote: > After this i wanted to install database.. as mentioned in documentation, i > did install mysql using YaST in OpenSUSE.. when i typed "mysql" in terminal > it showed an error -- " Can't connect to local > MySQL server through socket '/var/run/mysql/mysql.sock' (2)") " > > Almost certainly Mysql isn't running. Try 'ps aux | grep mysql' and see if there's anything listed (except for the grep command). If there's nothing, then 'sudo /etc/init.d/mysqld start' will probably get you going. Malcolm > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem in Configuring the database
On Fri, May 6, 2011 at 11:21 PM, Stuart MacKay < smac...@flagstonesoftware.com> wrote: > If you search for the error code 2002 the most likely cause is that the > MySQL server is not running. However you also mention that you are running > VMWare - I presume this is where the database server is running. Are you > trying to connect to the database from another system, i.e. windows ? > > I use VirtualBox and the default setup for networking is such that the > localhost cannot talk to the virtual server without explicitly setting up > network bridging. So if VMWare is similar this is also a possible cause for > your problems. > > As usual as much information about your setup and what options you have > tried would make it easier to identify the problem. > > > Regards, > > Stuart MacKay > Lisboa, Portugal > Sir Stuart Mackay, Thank you for the reply.. Let me start like this... "I wanted to develop a forum like application, i run WinXP, b'coz of very less HDD space.. i couldn't install linux on my machine, so i opted for VMWare & got OpenSUSE installed.. I downloaded Django and installed as instructed in documentation, Every thing worked fine till the step.."python manage.py runserver" after this i got that "welcome page 'Congrats' page" After this i wanted to install database.. as mentioned in documentation, i did install mysql using YaST in OpenSUSE.. when i typed "mysql" in terminal it showed an error -- " Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)") " I tried to check the error and correct what had gone wrong.. I Google 'd though i found info like.. there r different versions of "MySQL" for python and all... i even reinstalled it.. gave me the same error... unable to proceed further... That's when i found this group and mailed my problem... The Django Documentation gives a clear info of Sqllite 2/3 usage but not MySQL.. So what would u recommend me to install and work on..? Can u please explain me the Procedure ? Thank You.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem in Configuring the database
If you search for the error code 2002 the most likely cause is that the MySQL server is not running. However you also mention that you are running VMWare - I presume this is where the database server is running. Are you trying to connect to the database from another system, i.e. windows ? I use VirtualBox and the default setup for networking is such that the localhost cannot talk to the virtual server without explicitly setting up network bridging. So if VMWare is similar this is also a possible cause for your problems. As usual as much information about your setup and what options you have tried would make it easier to identify the problem. Regards, Stuart MacKay Lisboa, Portugal -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem in Configuring the database
On Fri, May 6, 2011 at 1:45 PM, r_bloodlifewrote: > Hello, > I'm a beginner trying to build an application.. > please help in correcting these errors.. > I'm Confused, whether to use "MySql" or "Sqllite3" > > > "rahul@linux-cgdq:~/myproject/prj> ls -l > total 36 > -rw-r--r-- 1 rahul users 148 2011-05-04 23:36 current_datetime.py > -rw-r--r-- 1 rahul users0 2011-05-04 22:52 __init__.py > -rw-r--r-- 1 rahul users 131 2011-05-04 22:53 __init__.pyc > -rw-r--r-- 1 rahul users 503 2011-05-04 22:52 manage.py > -rw-r--r-- 1 rahul users 5040 2011-05-06 13:33 settings.py > -rw-r--r-- 1 rahul users 2798 2011-05-04 23:29 settings.pyc > -rw-r--r-- 1 rahul users 555 2011-05-04 23:35 urls.py > -rw-r--r-- 1 rahul users 278 2011-05-04 22:53 urls.pyc > -rw-r--r-- 1 rahul users 209 2011-05-04 23:31 views.py > rahul@linux-cgdq:~/myproject/prj> python manage.py runserver > Validating models... > > Unhandled exception in thread started by Command.inner_run of > object at 0x82e790c>> > Traceback (most recent call last): > File "/usr/local/lib/python2.6/site-packages/django/core/management/ > commands/runserver.py", line 88, in inner_run >self.validate(display_num_errors=True) > File "/usr/local/lib/python2.6/site-packages/django/core/management/ > base.py", line 249, in validate >num_errors = get_validation_errors(s, app) > File "/usr/local/lib/python2.6/site-packages/django/core/management/ > validation.py", line 103, in get_validation_errors >connection.validation.validate_field(e, opts, f) > File "/usr/local/lib/python2.6/site-packages/django/db/backends/ > mysql/validation.py", line 14, in validate_field >db_version = self.connection.get_server_version() > File "/usr/local/lib/python2.6/site-packages/django/db/backends/ > mysql/base.py", line 338, in get_server_version >self.cursor() > File "/usr/local/lib/python2.6/site-packages/django/db/backends/ > __init__.py", line 252, in cursor >cursor = util.CursorWrapper(self._cursor(), self) > File "/usr/local/lib/python2.6/site-packages/django/db/backends/ > mysql/base.py", line 322, in _cursor >self.connection = Database.connect(**kwargs) > File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line > 71, in Connect >return Connection(*args, **kwargs) > File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line > 170, in __init__ >super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.OperationalError: (2002, "Can't connect to local > MySQL server through socket '/var/run/mysql/mysql.sock' (2)") > > " > > - I've Installed MySql whenever i try to start, it gives me this "_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)")" i tried everything as mentioned in the django documentation, their's more instruction on how to setup "sqllite3" than other databases.. one more thing.. i actually haven't installed linux on my drive.. i'm running on VMWare Workstation.. tried in Ubuntu 10.10 it was the same error now n OpenSUSE it's still the same.. am i facing the problem b'coz of this..? Thank you... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem in Configuring the database
It looks like a connection cannot be made to the MySQL database server. If you are just starting out with Django I would suggest that you use sqlite - it is really easy to work with (get the firefox plugin, https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/) and will do all the basic things you need. You can "upgrade" to MySQL later. Regards, Stuart MacKay Lisboa, Portugal -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
AW: Problem in Configuring the database
Hi, Well, are u using a MySQL database or sqilite ?! Of course that's what it depends on wether to use mysql oder sqlite driver. Mabe you could give us a little more information about your DB cheers . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von r_bloodlife Gesendet: Freitag, 06. Mai 2011 10:16 An: Django users Betreff: Problem in Configuring the database Hello, I'm a beginner trying to build an application.. please help in correcting these errors.. I'm Confused, whether to use "MySql" or "Sqllite3" "rahul@linux-cgdq:~/myproject/prj> ls -l total 36 -rw-r--r-- 1 rahul users 148 2011-05-04 23:36 current_datetime.py -rw-r--r-- 1 rahul users0 2011-05-04 22:52 __init__.py -rw-r--r-- 1 rahul users 131 2011-05-04 22:53 __init__.pyc -rw-r--r-- 1 rahul users 503 2011-05-04 22:52 manage.py -rw-r--r-- 1 rahul users 5040 2011-05-06 13:33 settings.py -rw-r--r-- 1 rahul users 2798 2011-05-04 23:29 settings.pyc -rw-r--r-- 1 rahul users 555 2011-05-04 23:35 urls.py -rw-r--r-- 1 rahul users 278 2011-05-04 22:53 urls.pyc -rw-r--r-- 1 rahul users 209 2011-05-04 23:31 views.py rahul@linux-cgdq:~/myproject/prj> python manage.py runserver Validating models... Unhandled exception in thread started by > Traceback (most recent call last): File "/usr/local/lib/python2.6/site-packages/django/core/management/ commands/runserver.py", line 88, in inner_run self.validate(display_num_errors=True) File "/usr/local/lib/python2.6/site-packages/django/core/management/ base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "/usr/local/lib/python2.6/site-packages/django/core/management/ validation.py", line 103, in get_validation_errors connection.validation.validate_field(e, opts, f) File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/validation.py", line 14, in validate_field db_version = self.connection.get_server_version() File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/base.py", line 338, in get_server_version self.cursor() File "/usr/local/lib/python2.6/site-packages/django/db/backends/ __init__.py", line 252, in cursor cursor = util.CursorWrapper(self._cursor(), self) File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/base.py", line 322, in _cursor self.connection = Database.connect(**kwargs) File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 71, in Connect return Connection(*args, **kwargs) File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 170, in __init__ super(Connection, self).__init__(*args, **kwargs2) _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)") " -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Problem in Configuring the database
Hello, I'm a beginner trying to build an application.. please help in correcting these errors.. I'm Confused, whether to use "MySql" or "Sqllite3" "rahul@linux-cgdq:~/myproject/prj> ls -l total 36 -rw-r--r-- 1 rahul users 148 2011-05-04 23:36 current_datetime.py -rw-r--r-- 1 rahul users0 2011-05-04 22:52 __init__.py -rw-r--r-- 1 rahul users 131 2011-05-04 22:53 __init__.pyc -rw-r--r-- 1 rahul users 503 2011-05-04 22:52 manage.py -rw-r--r-- 1 rahul users 5040 2011-05-06 13:33 settings.py -rw-r--r-- 1 rahul users 2798 2011-05-04 23:29 settings.pyc -rw-r--r-- 1 rahul users 555 2011-05-04 23:35 urls.py -rw-r--r-- 1 rahul users 278 2011-05-04 22:53 urls.pyc -rw-r--r-- 1 rahul users 209 2011-05-04 23:31 views.py rahul@linux-cgdq:~/myproject/prj> python manage.py runserver Validating models... Unhandled exception in thread started by > Traceback (most recent call last): File "/usr/local/lib/python2.6/site-packages/django/core/management/ commands/runserver.py", line 88, in inner_run self.validate(display_num_errors=True) File "/usr/local/lib/python2.6/site-packages/django/core/management/ base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "/usr/local/lib/python2.6/site-packages/django/core/management/ validation.py", line 103, in get_validation_errors connection.validation.validate_field(e, opts, f) File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/validation.py", line 14, in validate_field db_version = self.connection.get_server_version() File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/base.py", line 338, in get_server_version self.cursor() File "/usr/local/lib/python2.6/site-packages/django/db/backends/ __init__.py", line 252, in cursor cursor = util.CursorWrapper(self._cursor(), self) File "/usr/local/lib/python2.6/site-packages/django/db/backends/ mysql/base.py", line 322, in _cursor self.connection = Database.connect(**kwargs) File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 71, in Connect return Connection(*args, **kwargs) File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 170, in __init__ super(Connection, self).__init__(*args, **kwargs2) _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)") " -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.