0

I have python 2.7 installed. I have wamp running. I have MySQL running on 10127 port. I have root set up with no password i have (unrelated) php code running that connects fine with the call mysql_connect('localhost:10127', 'root', '');

when i try from the command line:

mysql -u 'root' -p '' -h 'localhost:10127'

i get the error

Unknown MySQL server host 'localhost:10127'

Similarly, when i make the call

   import MySQLdb as mdb
    import sys
    con = mdb.connect('localhost:10127', 'root','', 'dbname')

i get the error

Unknown MySQL server host 'localhost:10127' (11004)"

Does anyone know why-oh-why?

NormundsP
  • 445
  • 2
  • 7
  • 16
arhud
  • 69
  • 1
  • 9

2 Answers2

2

The CLI expects:

mysql -u root -h localhost --port 10127
Fluff
  • 548
  • 4
  • 8
0

mysql -u 'root' -p '' -h localhost -p 10127

https://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html

Dmitry B.
  • 9,107
  • 3
  • 43
  • 64