I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

problem when installing the wallet

dashed-slug.net Forums General discussion problem when installing the wallet

  • This topic has 10 replies, 3 voices, and was last updated 6 years ago by Anonymous.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2939
    Anonymous
    Inactive

    Hello guys, How are you?

    How can i fix this problem

    ” Bitcoin and Altcoin Wallets could NOT create a deposit addresses table “wp_wallets_adds” in the database. The plugin may not function properly. If this error message persists, please contact support. ”

    Thanks

    #2940
    alexg
    Keymaster

    Hello,

    I’m fine thanks (just one guy, not guys!), how are you?

    Your error is somewhat rare. When the plugin is first activated it creates two tables, wp_wallets_txs and wp_wallets_adds. It then does a check to see that these tables have been successfully created. This would show up if the tables did not exist. Can you please verify via phpmyadmin or via the SQL CLI whether these tables exist?

    Please send me the output of the following queries:

    SHOW TABLES LIKE '%wallets%';

    and

    SELECT VERSION();

    You could also try to create the table yourself with the following two DDL commands:

    CREATE TABLE wp_wallets_adds (
    	id int(10) UNSIGNED NOT NULL,
    	blog_id bigint(20) NOT NULL DEFAULT '1' COMMENT 'blog_id for multisite installs',
    	account bigint(20) UNSIGNED NOT NULL COMMENT 'wp_users.ID',
    	symbol varchar(5) COLLATE latin1_bin NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
    	address varchar(255) COLLATE latin1_bin NOT NULL,
    	extra varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR'
    	created_time datetime NOT NULL COMMENT 'when address was requested in GMT',
    	status enum('current','old') NOT NULL DEFAULT 'old' COMMENT 'all addresses are used to perform deposits, but only the current one is displayed',
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
    ALTER TABLE wp_wallets_adds
    	ADD PRIMARY KEY (id),
    	ADD UNIQUE KEY uq_ad_idx (address,symbol,extra),
    	ADD KEY retrieve_idx (account,symbol),
    	ADD KEY lookup_idx (address);

    If you get any errors while creating the table, please post it here.

    Thanks

    kind regard,
    Alex

    #2941
    Anonymous
    Inactive

    I got this error when trying to create the table!

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘created_time datetime NOT NULL COMMENT ‘when address was requested in GMT’, st’ at line 8

    thanks

    #2943
    alexg
    Keymaster

    Yes, apologies, there was a comma missing in there. Please try:

    CREATE TABLE wp_wallets_adds (
    	id int(10) UNSIGNED NOT NULL,
    	blog_id bigint(20) NOT NULL DEFAULT '1' COMMENT 'blog_id for multisite installs',
    	account bigint(20) UNSIGNED NOT NULL COMMENT 'wp_users.ID',
    	symbol varchar(5) COLLATE latin1_bin NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
    	address varchar(255) COLLATE latin1_bin NOT NULL,
    	extra varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR',
    	created_time datetime NOT NULL COMMENT 'when address was requested in GMT',
    	status enum('current','old') NOT NULL DEFAULT 'old' COMMENT 'all addresses are used to perform deposits, but only the current one is displayed'
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

    Index creation was correct:

    ALTER TABLE wp_wallets_adds
    	ADD PRIMARY KEY (id),
    	ADD UNIQUE KEY uq_ad_idx (address,symbol,extra),
    	ADD KEY retrieve_idx (account,symbol),
    	ADD KEY lookup_idx (address);

    Do let me know.

    regards

    #2949
    Anonymous
    Inactive

    Thanks Alex For quick replies!

    i got this error after trying the new code

    #1067 – Invalid default value for ‘status’

    regards

    #2950
    alexg
    Keymaster

    Thanks for the additional info, I am investigating this.

    The DDL is definitely correct, at least on MySQL 5.7.22, I double checked.

    It could be that you have an old and/or buggy version of MySQL, could you please also send me the output of:

    SELECT VERSION();

    This might help me pinpoint the problem.

    thank you

    #2953
    Anonymous
    Inactive

    Hello Alex

    This is the version i’m getting

    5.6.39-cll-lve

    #2954
    alexg
    Keymaster

    Thank you very much. Your version is recent.

    Can you try the following and tell me if it works please?

    CREATE TABLE wp_wallets_adds (
    	id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    	blog_id bigint(20) NOT NULL DEFAULT '1' COMMENT 'blog_id for multisite installs',
    	account bigint(20) UNSIGNED NOT NULL COMMENT 'wp_users.ID',
    	symbol varchar(5) COLLATE latin1_bin NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
    	address varchar(255) COLLATE latin1_bin NOT NULL,
    	extra varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR',
    	created_time datetime NOT NULL COMMENT 'when address was requested in GMT',
    	status enum('old','current') NOT NULL COMMENT 'all addresses are used to perform deposits, but only the current one is displayed',
    	PRIMARY KEY (id),
    	INDEX retrieve_idx (account,symbol),
    	INDEX lookup_idx (address),
    	UNIQUE KEY 'uq_ad_idx' ('address', 'symbol', 'extra')
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

    If this works I will add the fix to the next version of wallets. Some versions of MySQL seems to have a problem with defining default values for enum columns explicitly.

    Looking forward to your reply.

    regards

    #2964
    Anonymous
    Inactive

    Hello Alex,

    I am having the same problem.. The recent fix didn’t solve the issue and gave this error..
    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”uq_ad_idx’ (‘address’, ‘symbol’, ‘extra’) ) ENGINE=InnoDB DEFAULT CHARSET=lati’ at line 13

    I am using the same sql version 5.6.39-cll-lve

    Thanks!

    #2966
    alexg
    Keymaster

    Yes this is an issue with the formatting that this forum applies. In the line before the last one, i.e. the line that starts with UNIQUE KEY, replace all quote characters (') with backticks (`).

    #2969
    Anonymous
    Inactive

    Thanks very much Alex it worked !

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.