Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

errno 13 permission denied

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

It am running lazarus 1.8.2 on linux 17.2, and trying to connect to mysql 5.7.
I have a database named 'boa', with 5 columns, the first named 'mycheck';

I am using a TMySql57Connection, named boaconnection with the following settings:
Databasename=boa;
HostName=localhost
KeepConnection=false
LoginPrompt=false
Transaction=boatransaction
UserName=root,

A TSqlTransaction named boatransaction
Database named boaconnection

A TDatasource with DataSet set to BoaQuery

A TSqlQuery named boaquery with the following settings Database=boaconnection
Transaction=boatransaction
SQL='Select * from Checking

When I try to set boaquery.active to 'true' I get the following error code: BoaConnection: Error executing query: Can't find file: './boa/checking.frm' (errno: 13-Permission denied).

When I leave boaquery.active set to 'false', and run the program, when I try to open the table, I get:
Project MoneProject raised exception class 'ESQLDatabaseError' with message: BoaConnection:Error executing query: Can't read dir of './boa/' (errno:13-Permission denied)

How can I correct these errors?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180512/9c237d7e/attachment.html>

Reply by email

Larry Dalton
to Larry Dalton

I need to correct my original statement: the column name is 'checking', not 'mycheck'

Larry Dalton wrote 39 lines
It am running lazarus 1.8.2 on linux 17.2, and trying to connect to mysql 5.7. I have a database named 'boa', with 5 columns, the first named 'mycheck'; I am using a TMySql57Connection, named boaconnection with the following settings: Databasename=boa; HostName=localhost KeepConnection=false LoginPrompt=false Transaction=boatransaction UserName=root, A TSqlTransaction named boatransaction Database named boaconnection A TDatasource with DataSet set to BoaQuery A TSqlQuery named boaquery with the following settings Database=boaconnection Transaction=boatransaction SQL='Select * from Checking When I try to set boaquery.active to 'true' I get the following error code: BoaConnection: Error executing query: Can't find file: './boa/checking.frm' (errno: 13-Permission denied). When I leave boaquery.active set to 'false', and run the program, when I try to open the table, I get: Project MoneProject raised exception class 'ESQLDatabaseError' with message: BoaConnection:Error executing query: Can't read dir of './boa/' (errno:13-Permission denied) How can I correct these errors?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180512/064ab47d/attachment.html>

Reply by email

Michael Van Canneyt
to Larry Dalton
Larry Dalton wrote 41 lines
I need to correct my original statement: the column name is 'checking', not 'mycheck' On Sat, May 12, 2018 at 1:28 PM, Larry Dalton wrote: > It am running lazarus 1.8.2 on linux 17.2, and trying to connect to mysql > 5.7. > I have a database named 'boa', with 5 columns, the first named 'mycheck'; > > I am using a TMySql57Connection, named boaconnection with the following > settings: > Databasename=boa; > HostName=localhost > KeepConnection=false > LoginPrompt=false > Transaction=boatransaction > UserName=root, > > A TSqlTransaction named boatransaction > Database named boaconnection > > A TDatasource with DataSet set to BoaQuery > > A TSqlQuery named boaquery with the following settings > Database=boaconnection > Transaction=boatransaction > SQL='Select * from Checking > > When I try to set boaquery.active to 'true' I get the following error code: > BoaConnection: Error executing query: Can't find file: > './boa/checking.frm' (errno: 13-Permission denied). > > When I leave boaquery.active set to 'false', and run the program, when I > try to open the table, I get: > Project MoneProject raised exception class 'ESQLDatabaseError' with > message: > BoaConnection:Error executing query: Can't read dir of './boa/' > (errno:13-Permission denied) > > How can I correct these errors?

These are errors in your MySQL server. They have nothing to do with FPC. The file permissions on the server are wrong; the server process does not have sufficient rights to read/write the database files.

Assuming the server is on Linux or BSD, you should find the MySQL databases directory and execute as root
chown -R mysqld:mysqld boa
(mysqld must be replaced with the username that the mysql server is running as)

Michael.

Michael.

Reply by email