MySQL Issues

Dr. Mikeal Hughes macmikeal at me.com
Tue Jan 24 23:07:49 UTC 2017


I did get nautilus working once I figured out there was a gk in front of sudo and that once the nautilus comes up you have to click on the HDs inthe file manager on the desktop to get them to show up in nautilus. Once I did that it worked. Then I started running into the problem trying to find the my.cnf file to see what MySQL settings were. My never ending saga but learning a lot. But this is nothing of what I ran into setting up a mail server for my mailman list. Main thing I learn a lot in the challenge the endorphins race when it works!

Sent from my iPad

> On Jan 24, 2017, at 15:58, Karl Auer <kauer at biplane.com.au> wrote:
> 
>> On Tue, 2017-01-24 at 09:33 -0600, Dr. Mikeal Hughes wrote:
>> Ok here is one for you. I tried to enter the command sudo cd /root so
>> I could go in and check the my.cnf file so I could see how my login
>> information for MySQL is set. When I do I get Permission denied. I
>> was asked for my sudo password put it in. 
> 
> Good one :-)
> 
> Sudo creates a new shell with a new environment, executes your command
> in that new shell, then leaves the shell, drops root privileges and
> returns you to your previous shell and your previous environment. So
> after a sudo command you are back where you started.
> 
> With "cd" in particular though, it won't would work at all. You should
> get "command not found", because cd is an internal shell command, not
> an actual program that sudo can load and execute. I don't think it
> worked for you, and suspect you missed that error message.
> 
> To use cd in sudo you would have to tell sudo explicitly to start a
> shell with that command, i.e., use "sudo -i cd /root" or "sudo -s cd
> /root". But because of the whole "new shell" thing, neither of those
> would have the desired effect of leaving you in the specified
> directory.
> 
> In short "sudo cd /root" won't work.
> 
> One solution is to become root for a while with "sudo - bash", being
> very careful with your subsequent commands and remembering to exit
> afterwards.
> 
> The other solution is to use sudo and specify /root in each desired
> command. For example, if you wanted to list the files in /root you
> would use "sudo ls /root".
> 
> If you need to do a lot of stuff in the /root directory, or if they are
> destructive commands like rm, I'd recommend the former, in a separate
> terminal window, with emphasis on the "be careful" part. If it's just
> one or two commands or they are simple things like ls, I'd recommend
> using sudo.
> 
> Regards, K.
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Karl Auer (kauer at biplane.com.au)
> http://www.biplane.com.au/kauer
> http://twitter.com/kauer389
> 
> GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
> Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
> 
> 
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list