Comments - creating pivot table fails

9 years, 6 months ago Jeff Prater

I'm using MariaDB 10.0.12-MariaDB-certified on Windows 7 x64. I'm trying to create a pivot table using a query as the source. Whenever I try to execute the query, I get the following error:

Error Code: 1105 (1045) Access denied for user 'root'@'localhost' (using password: NO)

This is the query I'm trying to execute:

CREATE TABLE piv_assets_by_member ENGINE=connect table_type=pivot option_list='PivotCol=asset_type_desc,FncCol=sum_adjusted' SrcDef='select m.id, case m.entity_type_id when 1 then concat(m.last_name, '', '', m.first_name) when 2 then m.last_name end as entity_name, dat.description as asset_type_desc, sum(adjusted) as sum_adjusted from member m left join (select member_id, max(id) as max_analysis_id from analysis_history group by member_id) as max_ah on max_ah.member_id = m.id left join asset_detail ad on ad.analysis_id = max_ah.max_analysis_id left join desc_asset_type dat on dat.id = ad.asset_type_id group by id, entity_name, asset_type_desc';

I've tested the query in SrcDef multiple times and can verify it works. However, I can't figure out why I'm getting the access denied error. Is there something I'm doing wrong? I thought I followed the documentation correctly. Thanks!

 
9 years, 6 months ago Ian Gilfillan

The error message you are getting means that you are attempting to connect to MariaDB as root without a password. You need to connect with the password that was used to set up MariaDB.

 
9 years, 6 months ago Jeff Prater

I am using SQLyog to interact with MariaDB. The root account I'm using does, indeed, have a password--it's not blank as the message indicates. I should have included that in my original question.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.