LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-26-2015, 10:20 PM   #1
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Rep: Reputation: 30
Unable to fix MySQL Workbench install


If this is in the wrong area, please tell me where I should put it and I'll see what I can do to get it moved.

I am working on a Java project which uses MySQL database. My system is Ubuntu 15.04. I have installed Java, Eclipse and MySQL with no issues (that I have encountered). I installed MySQL Workbench with little difficulty. I created a "localhost" connection which seemed to be working fine. I started attempting to run the scripts which were supposed to set up my database appropriately to emulate the client's database setup. I'm new to MySQL and Workbench, so there were some issues. I finally worked through the bulk of the issues but I didn't have a connection at the end of it all. So I closed that connection tab and tried to open a new connection. My "localhost" connection didn't show up, so I went to manage connections to see why it didn't show and there were no saved connections listed. As soon as I clicked on the "New" button, I got a "Home Screen Error" indicating that Workbench "Could not save XML data to file /home/<username>/.mysql/workbench/other_connections.xml

I had to sudo in a terminal window just get into the directory - and everything in that directory is owned by root with the XML files readable by others. I have gone through all of the "suggestions" I can find online on how to clean up stuff - most having to do with apt-get. I've uninstalled and reinstalled MySQL Workbench through the Ubuntu Software Center. Nothing makes a difference. I would appreciate any help I can get. Thank you.
 
Old 07-27-2015, 12:06 AM   #2
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
Just to be clear, are you running that editor as a normal user? No sudo prefix, right?

I gave up on Oracle's SQL editor a long time ago. Use Squirrel SQL and install the mysql jdbc connector in Squirrel SQL's lib (I think) directory.

Alternately, MariaDB has a MySQL SQL editor. You should probably just move to MariaDB sooner rather than later. Oracle has been less than good about maintaining their open source projects, that is, unless you want to use Oracle's non-free product.

Last edited by mpapet; 07-27-2015 at 12:08 AM.
 
Old 07-27-2015, 07:31 AM   #3
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
This is being run from a link in the Ubuntu Gnome environment, I don't think there is any "sudo" prefix on it. And the issue, AFAIK, isn't with the editor so much as MySQL Workbench admin. I've not had issues with the editor, when I actually got it loaded.

It *seems* to me that the issue is with this one config file, or perhaps it's all of them and this is the first one it hits and chokes on. As for SQL Editors, I am familiar with SQuirreL SQL, but I don't know if it offers server administration in its mix of tools. MySQL Workbench does allow me to add/drop users, bounce the server and import/export data directly (in theory, never used that successfully in Linux). And the issue with the current install and past few installs (as I've installed and uninstalled about six times) is that when I try to create a new connection in Manage Connections, the whole process dies.

I hate to say this, but this is why I went back to Windows several years ago. It just works. It's not perfect, but I could install the OS, it detected both monitors, my USB mouse and my wireless dongle without a bunch of additional configuration and searching the world (wide web) for an esoteric fix to a not uncommon problem. I've already lost a week on this and really can't afford to spend a lot more time trying to get Linux working. I WANT this to work, but I need something working very soon.
 
Old 07-27-2015, 05:44 PM   #4
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
Yes, you can admin the server in squirrel sql. You should learn the SQL admin without a GUI anyway. I dump huge amounts of data out of Squirrel SQL.

Quote:
Originally Posted by gvaught View Post
I hate to say this, but this is why I went back to Windows several years ago.
I posted some alternatives and you respond by wishing for windows.

Run it all on windows. You'll have a different set of problems there and end up doing exactly what you complain about on Linux.

Neither one is perfect. Good luck.

Last edited by mpapet; 07-27-2015 at 05:48 PM.
 
Old 07-28-2015, 01:43 AM   #5
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
Well, it appears that the problem is that I somehow had MySQL set everything up (via Workbench) with root owning the .mysql/ directory (and everything under it) in my /home/<username> directory. Did a reinstall of the OS and things seem to be working much better. We will see when the database finishes replicating.

And I wasn't "wishing for Windows" - I was explaining why some folks go back to Windows. I've lost a week on this. My contact at the org which hired me has said several times "this is why I use Windows - it works and you don't have to spend all this time configuring it." I need to do billable work. They need the work done.

In the office, I use Squirrel. It's quite handy when accessing the DB2 databases. But this employer uses MySQL and the tool that does server admin and SQL is MySQL Workbench.
 
Old 07-28-2015, 09:16 AM   #6
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 16.04 LTS
Posts: 214
Blog Entries: 1

Rep: Reputation: 39
Quote:
Originally Posted by gvaught View Post
In the office, I use Squirrel. It's quite handy when accessing the DB2 databases. But this employer uses MySQL and the tool that does server admin and SQL is MySQL Workbench.
MySQL Workbench is not the only tool available; I'm at least as new to MySQL as you are, but I've found that the interpreter built into MySQL itself (usable from the command line only, no GUI) is quite adequate to do almost everything. The documentation is rather sparse and it takes a while to climb its learning curve, but so far I've found little that it won't do.

As a GUI alternative, there's "phpMyAdmin" and also a web-style program called "adminer" which requires that you have a LAMP stack installed. Both of these also appear to have full capability, but I find that using the command line and the simple "mysql" interpreter offers less opportunity for becoming confused. YMMV...

As for the permission errors, I ran into that situation when installing my local LAMP stack. My solution was to do a mass change of ownership and permissions on each directory that initially refused permission to me, and add the groups involved to my own user ID. Be extremely cautious about changing ownership, because many critical system files refuse to run if not owned by "root" or their original system UID.

In my case, the critical package was WordPress, so I changed only its directory to be owned by the default Apache user "www-data" and gave group "www-data" read-write permission to everything there. That solved the permissions problem; on a production system it would introduce a serious vulnerability, but my situation involves a local test system with only a single user and no access from the outside world...

EDIT--Something that may be confusing is that the MySQL user "root" is NOT the same as system user "root." MySQL has its own internal set of users, totally separate from the set of system users. It took me a while to figure this out...

Last edited by JimKyle; 07-28-2015 at 09:18 AM. Reason: added a point.
 
Old 08-14-2015, 05:10 AM   #7
MfromH
LQ Newbie
 
Registered: Jul 2014
Distribution: openSuse 12.2, SLES11.3, RHEL 5,
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by gvaught View Post
MySQL Workbench does allow me to add/drop users, bounce the server and import/export data directly (in theory, never used that successfully in Linux).
if you want MySQL Workbench to do such admin tasks, then you have to connect to MYSQL as root, did you?
You mentioned, you have created another connection from localhost, you may use that for connecting with MySQL Workbench if you want to juggle with your own data, but for adminstrating the mysql server you need to be connected to it as root. (root@localhost is always created when you install mysql.)
 
  


Reply

Tags
mysql-workbench



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to install older version of MySQL workbench on CentOS 5.6 Preacherpj Linux - Newbie 1 12-14-2012 10:07 AM
Mysql Workbench cannot connect LoneWolf69 Linux - Newbie 1 11-30-2011 10:28 PM
MySQL 5.0.67: Unable to install & run. Error /var/lib/mysql/mysql.sock' (2) peteyperson Linux - Server 2 03-04-2009 01:16 PM
LXer: Visual MySQL Database Design in MySQL Workbench LXer Syndicated Linux News 0 06-12-2008 07:00 PM
MySQL Workbench grahamtysall Linux - General 1 07-27-2007 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration