1

I am trying to bring up stratum mining on a pool and get this error -> exceptions.Exception: There is no shares table. Have you imported the schema? Obviously my database is empty but no package I have download from git has a single .sql file to populate the db. How do you populate the schema?

https://github.com/MPOS/php-mpos/wiki/Quick-Start-Guide https://github.com/ahmedbodi/stratum-mining/issues/97

gentoo001 stratum-mining # locate .sql
/usr/portage/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
/usr/portage/mail-filter/gld/files/tables.sql
/usr/share/doc/mysql-5.1.70/scripts/mysql_fix_privilege_tables.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables_data.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables_fix.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_test_data_timezone.sql.bz2
/usr/share/mysql/fill_help_tables.sql
/usr/share/mysql/mysql_fix_privilege_tables.sql
/usr/share/mysql/mysql_system_tables.sql
/usr/share/mysql/mysql_system_tables_data.sql
/usr/share/mysql/mysql_test_data_timezone.sql

2 Answers 2

1

This table isnt part of the MPOS schema you have to create it yourself, my schema for this table is:

mysql> show columns from shares;
+-----------------+--------------+------+-----+---------+----------------+
| Field           | Type         | Null | Key | Default | Extra          |
+-----------------+--------------+------+-----+---------+----------------+
| shareID         | int(11)      | NO   | PRI | NULL    | auto_increment |
| rem_host        | varchar(100) | YES  |     | NULL    |                |
| username        | varchar(100) | YES  |     | NULL    |                |
| our_result      | varchar(255) | YES  |     | NULL    |                |
| upstream_result | varchar(255) | YES  |     | NULL    |                |
| reason          | varchar(255) | YES  |     | NULL    |                |
| solution        | varchar(255) | YES  |     | NULL    |                |
+-----------------+--------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)

I keep this in a seperate db to MPOS but there is no reason you cant add it manually to the MPOS table. I will also add that while this works I'm not certain if varchar is the correct datatype to use here.

3
  • Where does this table comes from? I found the same issue here github.com/Crypto-Expert/stratum-mining/issues/52 but the solution doesn't yield the exact same schema. What does it mean?
    – gturri
    Commented Mar 23, 2014 at 21:50
  • Its one I made after looking through the source code.
    – hafnero
    Commented Mar 23, 2014 at 21:54
  • Thanks. I guess I'll post as an answer what I found out, since some might be interested in this other solution.
    – gturri
    Commented Mar 23, 2014 at 22:37
0

I stumbled upon the same issue when trying to install php-mpos. Fortunately, the quick start guide provides an answer.

Just run sudo mysql -p mpos < sql/000_base_structure.sql from the root of the php-mpos repo. It means using this file: https://github.com/MPOS/php-mpos/blob/development/sql/000_base_structure.sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.