Bug #6828 MySQL Administrator crashes and exits when I attempt to assign privileges
Submitted: 25 Nov 2004 17:47 Modified: 27 Nov 2004 4:01
Reporter: John McClenahan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.0.14 OS:Linux (Fedora core 3 updated to 24 Nov)
Assigned to: Alfredo Kojima CPU Architecture:Any

[25 Nov 2004 17:47] John McClenahan
Description:
I have obtained MySQL v4.1.7 server (downloaded on 22 Nov from mysql.com as a tarball) and installed it apparently successfully on a freshly locaded and updated Fedora Core 3 machine - a relatively old but reliable Celeron 466Mz, 256MB memory, 16Gb HDD machine - following the documentation. 

I have also  downloaded and installed MySQL Administrator v1.0.14, and installed it, again apparently successfully, in the recommended /opt/mysql-administrator directory. 

My problem arises when I try to assign privileges to a new user.

I have set up a root password for localhost MySQL server, and successfully set up a new (replication slave) account called repl. When I try to assign REPLICATION_SLAVE and REPLICATION_CLIENT privileges to it, I have two problems, one critical.

The non-critical problem is that the desired privileges don't initially display in the right hand column at all - these privileges don't appear in the list to begin with. Only when I move the focus in MySQL Administrator from User Administration to something else and back again do these privileges appear in the right hand column at all. If I  select either of the mysql or test databases, they disappear again.

The critical problem is that when I select these in Available Privileges, and try to apply them with no database selected (intending them to be global privileges) by clicking on the left-pointing triangle between the existing (still blank) privileges, and the available privileges, the Administrator program exits abruptly, with no error message, and the privileges were not applied. I can see no error message in the mysql log file either, browsing through a re-started MySQL Administrator. There may be some other log I should look in, but I don't know where to look.

I used to use MySQL CC (on a Windows XP  machine), but saw that MySQL Administrator has effectively replaced it both on Windows and Linux. Do I need to revert to MySQL CC until someone can suggest a way round my roadblock with Administrator?

Things I have tried or checked already:

The mysqld daemon is running (it starts automatically), and I can start MySQL Administrator and connect to the freshly installed mysql and test databases on localhost, and also to another locally networked machine whose database I am trying to replicate to the new machine. I can also connect to our web-site-hosted MySQL database at www.abbeytheatre.org.uk, and I can save all the connections - so I assume the installations of  MySQL and the Administrator are both basically ok.

There isn't a bug report about this already, as far as I can tell from searching mysql.com bug reports - I looked at all 36 that came up for the category MySQL Administrator, and none look relevant.

Thanks if anyone can help - I'm a relative newcomer to Linux, and having to struggle with a lot of things that are very different from Windows, so it is possible I've overlooked something obvious (to others) that isn't obvious to me.

John McClenahan

How to repeat:
It has done it every time I've tried to assign these privileges - four times so far.

Suggested fix:
Perhaps it is because I have no other databases defined? I would like to add a new schema, but cannot see how to, nor find it mentioned in the Help file for MySQL Administrator (I have searched for new, add, and schema separately, and found nothing relevant).  Can it be done through the GUI interface, or do I have to use the command line still?

I have tried right clicking on the Category heading, and on the Schema line above the list of existing schema, and tried the File menu as well. I have also tried typing in a new schema name, hoping that when the Filter found no database with that name the program would offer to create one. But nothing seems to offer me an option to create a new database or schema. 

I was hoping that defining the replication slave and client, and running the replication process would create the required database!
[25 Nov 2004 18:01] John McClenahan
Later the same day...
I have just discovered by accident how to add a schema - right click on an existing one!  Not on Category, nor on Schema, where I had expected to find it. 

Simple, but not initially obvious.

I've added a new schema now, but the initial problem is not affected - I still have both problems,  even with the new schema highlighted. Intially, the replication privileges don't display, and the program still crashes and exits when I attempt to assign them to this user.
[27 Nov 2004 4:01] Alfredo Kojima
To assign replication related privileges you need to have Global Privileges assignation enabled in Administrator. To enable it go to Edit->Preferences and toggle Show global privileges editor

As for the crashing bug you found, it has been fixed and should be ok in the next release.

Thank you for the bug report!
[28 Nov 2004 17:54] John McClenahan
This suggestion helped considerably, but I found I still needed to download, install and use the command line client to complete the process. I also needed a lot of work (including reading the documentation) to understand how to limit the replication to one database. (The initial error logs, after I got any success at all, said there were problems in a 'user' table, which is in the mysql privileges etc database, not my actual data, so I guessed that the replication master and slave were both attempting to replicate the whole set of databases on the master server, including the default mysql and test databases). 

I tried to make a clean start again,in preparation for copying the original database contents, by deleting all the binary logs on both master and slave machines. Some complaints ensued about trying to continue replication from a now-non-existent position in a non-existent binary log, fixed by editing the master.info file.

When I then tried to copy the starting data, using the LOAD DATA FROM MASTER command, I got 'OK. 0 rows updated' which suggested a problem in write permissions locally. I got  round this, inelegantly, by giving all permissions except GRANT to the user I was connected as, via the command line, and trying the command again. THEN the data downloaded, I could restart binary logging on the master, and restart the slave. So finally it all came together and now seems to work fine.