no schema for stratum

1

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

dooode

Posted 2014-01-25T15:27:41.277

Reputation: 529

Answers

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.

hafnero

Posted 2014-01-25T15:27:41.277

Reputation: 841

Where does this table comes from? I found the same issue here https://github.com/Crypto-Expert/stratum-mining/issues/52 but the solution doesn't yield the exact same schema. What does it mean?

gturri 2014-03-23T21:50:23.837

Its one I made after looking through the source code.hafnero 2014-03-23T21:54:12.720

Thanks. I guess I'll post as an answer what I found out, since some might be interested in this other solution.gturri 2014-03-23T22:37:35.737

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

gturri

Posted 2014-01-25T15:27:41.277

Reputation: 101