ERROR 2000 (HY000): Unknown MySQL error

1,214 views
Skip to first unread message

Suresh Rajagopal

unread,
Aug 22, 2017, 9:57:36 PM8/22/17
to proxysql

Hi,

I seeing this weird error while select data from a table with single column.

Tried with Proxy SQL version: 1.3.9 and 1.4.1

Admin> select id from srs;

+----+

| id |

+----+

|  1 |

|  2 |

+----+

2 rows in set (0.00 sec)


Admin> select * from srs;

ERROR 2000 (HY000): Unknown MySQL error

Admin> select id from srs;

ERROR 2013 (HY000): Lost connection to MySQL server during query

Admin> select id from srs;

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

Connection id:    11

Current database: test


+----+

| id |

+----+

|  1 |

|  2 |

+----+

2 rows in set (0.02 sec)


If i add a second column , then error goes away.


Admin> show create table srs;

+-------+----------------------------------------------------------------------------------------------------------------------------------------------+

| Table | Create Table                                                                                                                                 |

+-------+----------------------------------------------------------------------------------------------------------------------------------------------+

| srs   | CREATE TABLE `srs` (

  `id` int(11) NOT NULL,

  `name` varchar(10) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

+-------+----------------------------------------------------------------------------------------------------------------------------------------------+

1 row in set (0.00 sec)


Admin> select * from srs;

+----+--------+

| id | name   |

+----+--------+

|  1 | suresh |

|  2 | suresh |

+----+--------+

2 rows in set (0.00 sec)


Thanks

Suresh


René Cannaò

unread,
Aug 23, 2017, 3:39:04 AM8/23/17
to Suresh Rajagopal, proxysql
Hi Suresh,

This seems an error coming from MySQL Server itself and not from ProxySQL.
I would to check ProxySQL error log, but most importantly MySQL Server error log.
Here is a working example:


$ mysql -u sbtest -psbtest -h 127.0.0.1 -P6033
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 209
Server version: 5.5.30 (ProxySQL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use sbtest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> CREATE TABLE `srs` (
    ->
    ->   `id` int(11) NOT NULL,
    ->  PRIMARY KEY (`id`)
    ->
    -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0,09 sec)

mysql> INSERT INTO srs VALUES (1),(2);
Query OK, 2 rows affected (0,01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM srs;

+----+
| id |
+----+
|  1 |
|  2 |
+----+
2 rows in set (0,00 sec)

mysql> SELECT id FROM srs;

+----+
| id |
+----+
|  1 |
|  2 |
+----+
2 rows in set (0,00 sec)



Final note: your use of "Admin> " prompt was quite misleading. At first I thought you were running these commands in the Admin interface.

Thanks,
René

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

Reply all
Reply to author
Forward
0 new messages