[web2py] Re: Can't connect to MySQL

2019-09-10 Thread backseat
This code fails:

uri = configuration.get('db.uri')
print uri
db = DAL(uri)

The uri printed is:

'mysql://rota:rota@localhost/rota?set_encoding=utf8mb4'

This code works:

db = DAL('mysql://rota:rota@localhost/rota?set_encoding=utf8mb4')

That's exactly the same URI (it was copy and pasted in Vim). 

I'm moving on.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9c59444e-1b68-445a-be0d-eb821bc55b48%40googlegroups.com.


[web2py] Re: Redis and Python3?

2019-09-10 Thread Massimo Di Pierro
:-)

On Monday, 9 September 2019 22:40:36 UTC-7, Joe Barnhart wrote:
>
> ROFL!  I don't think it's quite ready for my prime-time cash-producing 
> website yet.  I'll definitely keep an eye on it and start playing around 
> with it.  I need to keep you from making any decisions I don't like, after 
> all!
>
> -- Joe
>
>
> On Monday, September 9, 2019 at 8:48:54 PM UTC-7, Massimo Di Pierro wrote:
>>
>> py4web supports redis. Just saying. ;-)
>>
>> On Monday, 9 September 2019 09:27:20 UTC-7, Joe Barnhart wrote:
>>>
>>> I sure wish somebody could fix this.  It's a real bottleneck to Python3 
>>> adoption for my site.  I tried using local storage for sessions but the 
>>> limitation on data size makes it a no-go for my site.  If I can't use redis 
>>> I'll have to drop back to storing sessions in files and that really sucks 
>>> for a larger deployment.
>>>
>>> -- Joe
>>>
>>> On Monday, April 1, 2019 at 11:31:10 PM UTC-7, Massimo Di Pierro wrote:

 we could change True/False with 1/0 but a better approach would be to 
 remove the value within the redis adapter. The value of locked does not do 
 anything anyway on redis since it is not a relational database with 
 transactions.

 On Sunday, 31 March 2019 10:19:20 UTC-7, Jim S wrote:
>
> I changed the following in gluon/globals.py and mine is working now.  
> But, I'm unclear on how to test to see if it is handling the locking 
> properly:
>
> dd = dict(locked=False,
>   client_ip=response.session_client,
>   modified_datetime=request.now,
>   session_data=session_pickled,
>   unique_key=unique_key)
>
> to 
>
> dd = dict(locked='False',
>   client_ip=response.session_client,
>   modified_datetime=str(request.now),
>   session_data=session_pickled,
>   unique_key=unique_key)
>
> This makes all my stuff work (I'm still on Python 2.7 but I think the 
> problem has to do with the python redis client moving to version 3).
>
> Leonel - I think this relates back to an issue you commented on late 
> last year.   
> https://groups.google.com/forum/?pli=1#!searchin/web2py/redis%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ
>
> At that time I just continued using python redis 2.10.6.  But, can't 
> do that forever.  Anyone able to test or improve upon the change I made 
> above?  Like I said, it works for me, but I don't know how to see if I'm 
> causing any other unforeseen damage.
>
> -Jim
>
> On Friday, March 29, 2019 at 7:49:03 PM UTC-5, Joe Barnhart wrote:
>>
>> Hi Leonel --
>>
>> My brain refuses to put together the words "session locked field".  I 
>> understand the part of pickle smashing the values and encoding them as 
>> one 
>> string.  The bool has something to do with session locking?  
>>
>> I've only looked at the web2py redis code in the most scant way as I 
>> wasn't planning to become a redis expert.  Sessions in redis could be 
>> important to me, tho, so I may need to set aside some time to dig into 
>> it. 
>>  (Storing sessions in cookies has been problematic due to the limited 
>> space 
>> for cookies in browsers.)
>>
>> -- Joe
>>
>>
>> On Wednesday, March 27, 2019 at 4:49:25 PM UTC-7, Leonel Câmara wrote:
>>>
>>> It's not your values Joe, pickle serializes them as a string so they 
>>> would be fine. It's web2py session locked field which is True or False. 
>>> It's probably easy to fix this in redis_session.py
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8d1c8c40-6c2e-4719-9edd-546599333e32%40googlegroups.com.


[web2py] Quick Favor?

2019-09-10 Thread rjmolesa
Hey,

I just signed the petition "Time Inc. : Bring back MySpace" and wanted to
see if you could help by adding your name.

Our goal is to reach 100 signatures and we need more support. You can read
more and sign the petition here:

http://chng.it/gGc8F6hVTM

Thanks!
Jenni

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEOipxdhMGEqxQLw1wvxTZbaaJXuwGQ%3DvOBX8y5jBeDtY%2BtXEQ%40mail.gmail.com.


[web2py] 1215 Cannot add foreign key constraint

2019-09-10 Thread Steve
Goodevening,

I am trying to migrate from Sqite to MySQL.
Unfortunatly when restoring the field in the DB tables i get the following 
error: 
 (1215, u'Cannot add 
foreign key constraint')
location of issue: Field('Insurance',db.insurance,label=T('Insurance')),

When i look this up in google  this could be caused by  a Field which 
has the reuirement= Not NULL but has no Default value set.
I tested this but not able to get passed the error.

*first table with field in db1.py*

db.define_table('insurance',
Field('Company',requires=IS_NOT_EMPTY(error_message='cannot 
be empty!'), label=T('Company')),
Field('Insurance_number','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'),  
label=T('Insurance Number')),
Field('Street_name', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('Street 
Name')),
Field('House_number','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('House 
Number')),
Field('Postal_code','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'),label=T('Postal 
Code')),
Field('City','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('City')),
Field('Region','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('Region')),
Field('Country','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), 
label=T('Country')),
Field('Telephone_number','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('Telephone 
Number')),
Field('Mobile','string', 
requires=IS_NOT_EMPTY(error_message='cannot be empty!'), label=T('Mobile')),
Field('Email','string', 
requires=IS_EMAIL(error_message='invalid email! Please fill in a correct 
e-mail address.'), label=T('Email')),
auth.signature, format='%(Company)s',fake_migrate=True)

*Second table which in a db2.py:*

db.define_table('client',

Field('Debtor_nr',requires=IS_NOT_EMPTY(error_message='cannot be empty!'), 
label=T('Debtor number')),
Field('Insurance',db.insurance,label=T('Insurance')), --> this 
is where the first issue takes place

Where should i add a default value ? to et this issue fixed

Hope you can help me with this

Steve

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8e093bfc-0af8-42de-a260-09447281b183%40googlegroups.com.


[web2py] Re: Can't connect to MySQL

2019-09-10 Thread backseat

>
> MySQL is listening on the default port:
>

$ telnet localhost 3306
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
c
5.5.5-10.3.17-MariaDB-0+deb10u1�a3y(W]OS��-��5KZaY|$920;vmysql_native_password^CConnection
 
closed by foreign host.

 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6d68c56b-ef9c-427e-a88b-88a089178a83%40googlegroups.com.


[web2py] How do I solve this error: NameError: name 'person_id' is not defined in KPax2

2019-09-10 Thread Maurice Waka
I'm trying out a surveys app from KPax2/surveys/take_survey..


but got this error:
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.

Traceback (most recent call last):
  File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
  File "/home/mauricewaka/web2py/applications/KPax2/controllers/surveys.py" 
, line 
370, in 
  File "/home/mauricewaka/web2py/gluon/globals.py", line 421, in 
self._caller = lambda f: f()
  File "/home/mauricewaka/web2py/gluon/tools.py", line 3869, in f
return action(*a, **b)
  File "/home/mauricewaka/web2py/applications/KPax2/controllers/surveys.py" 
, line 
93, in take_survey
survey,sa=thissurvey()
  File "/home/mauricewaka/web2py/applications/KPax2/models/db_surveys.py" 
, line 95, 
in thissurvey
if not has_access(person_id,'survey',survey_id,'take'):#if not 
has_access(person_id,'survey',survey_id,'take'):
NameError: name 'person_id' is not defined


Was there a table that was not created/defined?

How do I solve this

Kind regards

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/df61e41e-8d26-46ec-9a56-83dd85f78262%40googlegroups.com.


[web2py] Overiding the auth table ID fields to allow for release over pillars (Development, Acceptance, Production)

2019-09-10 Thread Val K
why do you have to override ids? You can just create users with the required 
ids.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d7c96f93-76e4-4c35-b49b-1bdb7d6ba45d%40googlegroups.com.


[web2py] Can I use SQLFORM for get id row (only read)?

2019-09-10 Thread Константин Комков
Hello! I have SQLFORM:
db.tt_main.GROUP_ID.requires = IS_IN_DB(db((db.a_groups.id == db.tt_main.
GROUP_ID) & (db.a_groups.INACTIVE == 0) & (db.a_groups.FO == 1)),db.a_groups
.id,'%(NAME)s')
db.tt_main.MODULE.requires = IS_IN_DB(db(db.tt_main.MODULE), db.tt_main.
MODULE)
form = SQLFORM(db.tt_main,fields=['MODULE','GROUP_ID'],labels = {'MODULE':T(
'Module'),'GROUP_ID':T('Name of group')},submit_button=T('Select timetable'
))
if form.validate():
#don't work ↓ 
#form.vars.id = db.person.*select*(**dict(form.vars))
for that table of timetables:
db.define_table(
'tt_main',
Field('GROUP_ID','reference a_groups',unique=True),
Field('MODULE', 'integer',unique=True),
migrate=False
)
If I add readonly=True,record_id=True for SQLFORM None in Form on site, 
like on picture. I just want get id of timetable in user interface for 
create ability edit it.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ac42423d-7179-4312-8454-0cab9929b2cd%40googlegroups.com.


[web2py] Overiding the auth table ID fields to allow for release over pillars (Development, Acceptance, Production)

2019-09-10 Thread Davidiam
We are planning on using Web2Py in a 3 tier release model (Development, 
Acceptance, Production) but as the ID fields in the auth tables are used as 
primary and foreign keys, we are concerned that this will cause 
inconsistencies between the different pillars.
We will be using SSO for access to web2py and users and groups need to be 
defined via our company's identity management system.  We plan on running 
scripts to update the Auth users and group tables based on a daily file 
feed.

We may need to create groups and group memberships manually in the 
development pillar which will later be defined in our identity management 
and AD systems to have them also in acceptance and production and so the 
IDs may become a mess.

One idea we had is to override the generated IDs in the USER and GROUP 
tables with the ID from our single source identity feed using its unique 
keys (user_id and group_id from our internal systems), but we are not sure 
if this will create problems down the line with the other tables which use 
the automatically generated sequential ID's, for example, the 
auth_permission table.

Any recommendations on how to deal with this issue in Web2Py releases ?  
Would our idea of replacing the ids with the unique id's provided by our 
internal systems be a solution or cause other issues ?

Kind Regards,
David

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/00691d6d-7d15-47e0-a27e-d19b601bee96%40googlegroups.com.


[web2py] Re: How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-10 Thread mostwanted
I figured if I could update the amount field in db.product within the buy 
functiontion just around the same time i'm saving inside the db.sale table 
when purchasing then it should be easy but I am having a really hard time 
identifying only the purchased items by their ids & subtracting their 
quantities from similar items in db.product! 

The code below is able to update the amount in db.product but it updates 
for all products which is not what i want
CODE SAMPLE 1:
for item1 in item1:
diff=item1.amount-value
db(db.product.amount).update(amount=diff)

Then i made another desperate attempt with the code below but it is not 
updating anything at all!
for item1 in item1:
for id, k in session.cart.items():
if item1.id==k:
diff=item1.amount-value
db(db.product.amount).update(amount=diff)

Anyone who can do this better please help.

Regards;

Mostwanted

On Thursday, September 5, 2019 at 8:21:56 AM UTC+2, Dave S wrote:
>
>
>
> On Wednesday, September 4, 2019 at 10:59:21 PM UTC-7, mostwanted wrote:
>>
>> I have a website where I am selling items, what I desperately want to 
>> achieve is to be able to show the buyers the remaining number of each item. 
>> I have 2 tables, the table that has all the items being sold & has a field 
>> amount which is the current number of items in stock and the other table 
>> which records sales as customers buy and has a field quantity which is 
>> the quantity of items purchased. After a customer has made a purchase I 
>> want to be able to subtract quantity from amount and have difference 
>> update and be the new value for amount.
>>
>> I wrote some controller code which is not achieving this, it is instead 
>> updating the amount field for all items with the same figure.
>>
>>
>> THE VIEW
>>
>> {{extend 'layout.html'}}
>>
>> 
>> {{for p in products:}}
>> {{if p.product_type=="Earrings":}}
>> 
>> {{=p.name}}
>> {{=p.amount}} available in stock
>> 
>> {{=MoneyFormat(p.price)}}
>> 
>> > height="200px"/>
>> 
>> {{=session.cart.get(p.id,0)}} in cart - {{=A('add to 
>> cart',callback=URL('cart_callback',vars=dict(id=p.id,action='add')),target='item%s'%p.id,_class='button
>>  pill')}}
>> 
>> Click 
>> the image to enlarge
>> 
>> 
>> {{pass}}
>>
>> {{pass}}
>> 
>>
>>
>> THE CART_CALLBACK FUNCTION
>>
>>
>> def cart_callback():
>> id = int(request.vars.id)
>> if request.vars.action == 'add':
>> session.cart[id]=session.cart.get(id,0)+1
>> if request.vars.action == 'sub':
>> session.cart[id]=max(0,session.cart.get(id,0)-1)
>> return str(session.cart[id])
>>
>>
>> MY FUNCTION FOR UPDATING AFTER PURCHASES
>>
>> def index():
>> if not auth.user:
>> response.flash=T('PLEASE LOG IN FIRST TO BE ABLE TO GET THE MENU AND 
>> BUY')
>> products = db(db.product).select(orderby=db.product.name)
>> num=db(db.sale).select()
>> for n in num:
>> quantity=n.quantity
>> if quantity is None:
>> quantity=0
>> for p in products:
>> amount1=p.amount-quantity
>> db(db.product.amount).update(amount=amount1)
>> return locals()
>>
>>
>> What should happen is that every time a customer buys whatever number of 
>> items a new figure showing reduction in number of items should be displayed.
>>
>>
>> Regards;
>>
>>
>> Mostwanted
>>
>>
>>
> index() looks like it spends a great deal of time subtracting everything 
> in sales from everything in products.
>
> I think you are recording the product id in the cart.  Are you then (on 
> check-out, I presume) recording the product id in db.sales?
>
> if so , then you don't need the select() on all products.
> Instead, use the product id in each row of db.sales to select the product 
> entry to update.
>
> You probably want a way to identify which rows in db.sales have already 
> been processed (that is, which quantities have already been subtracted from 
> the the available in the corresponding product entry).
>
> /dps
>
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/72d0171e-3668-4554-8606-f65536e1d8ec%40googlegroups.com.


[web2py] PythonAnywhere to AWS

2019-09-10 Thread Ian Ryder
Hi all, I asked a question a while back about AWS and Nginx but didn't get 
a reply so trying a different path!

I've got an app I need to move over to AWS - does anyone know the easiest 
way to get web2py up and running on Amazon? I tried the old scripts for 
nginx but they seem to be out of date.

Any help appreciated.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ba3b43ae-4ad9-483d-a92d-5401f86e6696%40googlegroups.com.


[web2py] smartgrid linked table edit returns to main table listing and not to the linked table listing

2019-09-10 Thread icodk
 smartgrid that shows list of parents from a parents table and a Children  
linked table. Clicking on the Children link on a specific parent line shows 
a list of children's of that parent.
So far so good. 
Click on the edit button on specific child in the list  I can edit this 
child.
Finish editing by submitting the edit form of the child takes me back to 
the parent list and not to the list of children where I was just before I 
started editing specific child.
How can I get back to the list of children of the parent instead of to the 
parents list after editing  a child record?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ee62c36b-4395-47fe-af29-23f901c46eb8%40googlegroups.com.


Re: [web2py] VSCODE with linter + debugging in WEB2PY

2019-09-10 Thread Murat KAŞIKÇIOĞLU
Hi,
I work with VSCODE like this:
- Open folder includes web2py.py file.
- Insert some debug point to desired lines
- Press F5

Also my environment:
Windows 10 Pro
Web2py Python 2.7
(maybe Py 3> works same.)

Best.

---
Murat KAŞIKÇIOĞLU
+90 (533) 745-1400



Monir , 4 Eyl 2019 Çar, 18:55 tarihinde şunu yazdı:

> Hi All,
>
> I'm new on Python and also on Web2py. I've been searching some sort of
> info or step by step about how to config web2py in VS CODE to Debug, Lint,
> Intelisense, etc... would be nice!
>
> But unfortunately, all resources I have found so far seems to be
> deprecated. Even here in the group, this seems to be not relevant topic. Am
> I wright ?
>
> I had downloaded Don Jaimanne extension, Pylint, etc without success.
>
> I would be more than happy with some fresh guide for this
>
> Regards/
>
> *Monir*
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/CAPMO4iG4HbFnspELy7_uT077RNTAadvzYcAm4mztcJM02Nu3CQ%40mail.gmail.com
> 
> .
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAC5t_Jxnm5CcHhPk7Qji-Zik_xU5nmnEXUzFxMhitH7M-89-Qw%40mail.gmail.com.


[web2py] Re: Can't connect to MySQL

2019-09-10 Thread 'Annet' via web2py-users
According to the book the connection string for MySql is:

mysql://username:password@localhost/test?set_encoding=utf8mb4

Maybe adding the TCP port solves the issue:

mysql://username:password@localhost:13306/test?set_encoding=utf8mb4


Kind regards,

Annet

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c65717e1-9bb3-4aee-820a-684bc3319964%40googlegroups.com.