UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.