Comments - creating pivot table fails
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.
Try this:
testuser
needs to haveSELECT
rights on thetest1
table and should not have to enter a password.The failure you're getting is because when connect accesses the data in the test1 table for use in the xsort table, it opens a new connection to the database. Since you didn't specify a user when creating the xsort table it uses whatever user was used when the table was created, root. When connect tries to open the connection it doesn't have a password so you get the
Access denied...
message.Thank you for your answer Daniel
That of creating a new user with no password and limited permission, it is also the approach suggested in the doc: https://mariadb.com/kb/en/connect-proxy-table-type/
There is also a
password
option for theoption_list
if you want to use a user that requires a password.Worth also saying that one must be careful with password inside option_list.
As stated in the doc: https://mariadb.com/kb/en/connect-proxy-table-type/
" ... it is often not advisable to write in clear a password that can be seen by all user able to see the table declaration by show create table ..."
Therefore, as Daniel himself said and as also stated in the doc, it is better to create a new user with no password and permissions only to specific tables