Wednesday, March 6, 2013

Re: Cannot connect to local or cloud database with pycharm

Hey, I'm very very new at python, and google app engine. Where should I be putting these configuration options?


On Monday, March 4, 2013 4:43:52 PM UTC-6, Takashi Matsuo wrote:
Hi jason,

I can successfully connect from within pycharm. I added the following
to the 'additional options' configuration option.
--mysql_socket=/var/run/mysqld/mysqld.sock

Can you tell me the mysql option you're using?

On Mon, Mar 4, 2013 at 2:12 PM, Takashi Matsuo <tma...@google.com> wrote:
> I'll try to reproduce it from now, but isn't it possible that the
> security mechanism of your operation system prevents pycharm from
> opening the socket? What happens when you use just the command line?
>
> On Mon, Mar 4, 2013 at 1:32 PM,  <jcol...@qualitydistribution.com> wrote:
>> Anybody?
>>
>>
>> On Friday, March 1, 2013 2:53:37 PM UTC-6, jcol...@qualitydistribution.com
>> wrote:
>>>
>>> Here's the code:
>>>
>>>> import cgi
>>>> import webapp2
>>>> from google.appengine.api import rdbms
>>>
>>>
>>> and
>>>
>>>> def get_connection():
>>>>     return rdbms.connect(instance=CLOUDSQL_INSTANCE,
>>>> database=DATABASE_NAME,
>>>>         user=USER_NAME, password=PASSWORD, charset='utf8')
>>>
>>>
>>>
>>> and
>>>
>>>>         conn = get_connection()
>>>>         cursor = conn.cursor()
>>>>         cursor.execute('select * from  ...
>>>
>>>
>>> This is the error I get:
>>>
>>>> File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in
>>>> Connect
>>>> File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, in
>>>> __init__
>>>> OperationalError: (2004, "Can't create TCP/IP socket (10104)")
>>>
>>>
>>>  Please Help!!!!!!!
>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Cloud SQL discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
>
> --
> Takashi Matsuo | Developers Advocate | tma...@google.com



--
Takashi Matsuo | Developers Advocate | tma...@google.com

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment