Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

python & mysql

Featured Replies

Sorry, I found out by myself. I leave the topic in case it could help someone

 

Hi!

 

I am trying to install a local mysql server to use with python. Fail so far:

 

the mini servers 11 and 12 seem to work fine: I can browse the user table in mysql db.

I have python 2.6 installed alongside mysql-python1.2.3

 

But I cannot connect to the mini server thru python:

 

import MySQLdb

c=MySQLdb.connect(host="127.0.0.1:3312",user="root",passwd="test",db="mysql")

or

c=MySQLdb.connect("localhost:3311","root","test","mysql")

or

any combination of the above outputs ST like:

OperationalError: (2005, "Unknown MySQL server host '127.0.0.1:3312' (11001)")

 

So, do I do anything wrong? Any advice?

Thanks

One has to type instead:

c=MySQLdb.connect(host="127.0.0.1", port=3312,user="root",passwd="test",db="mysql")

or

c=MySQLdb.connect("localhost","root","test","mysql", 3312)

 

HTH n sorry if i botherd you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.