Dump MySQL database with no access to MySQL database

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
capt_henry
Posts: 11
Joined: Sat 06 Nov 2004 09:33

Dump MySQL database with no access to MySQL database

Post by capt_henry » Tue 20 Dec 2016 16:18

Hi

I have been using MySQLDump for years now but have a problem dumping a database on a shared server. I cannot get select access to any other database such as the MySQL database but have full access to the database I wish to dump.

How do I do this?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Dump MySQL database with no access to MySQL database

Post by Shalex » Fri 23 Dec 2016 14:42

1. Please specify the exact text of the error(s) you are getting.
2. Tell us all non-default settings of your MySqlDump instance.
3. Give us information (version, edition, etc) about your MySQL shared server. Is it possible to create a trial account for testing your MySQL shared server?

capt_henry
Posts: 11
Joined: Sat 06 Nov 2004 09:33

Re: Dump MySQL database with no access to MySQL database

Post by capt_henry » Wed 04 Jan 2017 17:47

Hi

The error message is "SELECT command denied to user 'xxx' for table 'proc'". User info replaced with xxx for post.

The host is a hosted shared Linux server and the config for MySQL is through CPanel. The user has full permissions to the database and can be accessed remotely on dev PC OK with DB tools. DB is MariaDB 10.0.28.

The dump snippet is:

Dim dbDump As MySqlDump = New MySqlDump() With {
.Connection = MySqlConnection,
.Database = DbName,
.GenerateHeader = True,
.IncludeDrop = True,
.IncludeUse = True,
.UseExtSyntax = False,
.ObjectTypes = MySqlDumpObjects.Procedures _
Or MySqlDumpObjects.Events _
Or MySqlDumpObjects.Views _
Or MySqlDumpObjects.Triggers _
Or MySqlDumpObjects.Tables _
Or MySqlDumpObjects.Functions,
.QuoteIdentifier = True,
.Mode = DumpMode.All}

dbDump.Backup()

The error is thrown as soon as the dbDump.Backup() is invoked.

I can't provide access details/trial DB as it is a live customer server.

Regards

Colin

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Dump MySQL database with no access to MySQL database

Post by Shalex » Thu 05 Jan 2017 14:58

Thank you for the additional information. We will investigate the issue and notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Dump MySQL database with no access to MySQL database

Post by Shalex » Wed 11 Jan 2017 18:15

capt_henry wrote: .ObjectTypes = MySqlDumpObjects.Tables _
OrMySqlDumpObjects.Views _
Or MySqlDumpObjects.Triggers,
This should work if your account has an access to the database you intend to dump.
capt_henry wrote: .ObjectTypes = MySqlDumpObjects.Procedures _
Or MySqlDumpObjects.Functions,
Requires an access to the "proc" table in the system "mysql" database which stores the corresponding information.
capt_henry wrote: .ObjectTypes = MySqlDumpObjects.Events,
Requires an access to the "event" table in the system "mysql" database.

Could you please ask your database administrator to grant a SELECT privilege on the "proc" and "event" tables in the system "mysql" database to your account?

capt_henry
Posts: 11
Joined: Sat 06 Nov 2004 09:33

Re: Dump MySQL database with no access to MySQL database

Post by capt_henry » Wed 18 Jan 2017 14:18

Thank you I will do that.

Post Reply