How to fix this mysql permission problem? The Next CEO of Stack OverflowMysql Database files read accessCrontab permission problemPermission denied writing to mysql logHow Remove permission denied with GRANT USAGE ON mysqlProblem with MySQL timezoneError 2002 MYSQL OS X 10.11User permissionshelp for user permissions and file directory access mac OS SierraMySQL SystemD Logfile Permission Deniedmysql after sudo su works; mysql or sudo mysql fails

Is it professional to write unrelated content in an almost-empty email?

Are there any limitations on attacking while grappling?

Is micro rebar a better way to reinforce concrete than rebar?

Inappropriate reference requests from Journal reviewers

Is it ever safe to open a suspicious html file (e.g. email attachment)?

Is it possible to search for a directory/file combination?

Is there an analogue of projective spaces for proper schemes?

Would a completely good Muggle be able to use a wand?

How do I avoid eval and parse?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Why does standard notation not preserve intervals (visually)

Won the lottery - how do I keep the money?

Received an invoice from my ex-employer billing me for training; how to handle?

What is the result of assigning to std::vector<T>::begin()?

Novel about a guy who is possessed by the divine essence and the world ends?

Does it take more energy to get to Venus or to Mars?

Sending manuscript to multiple publishers

What happens if you roll doubles 3 times then land on "Go to jail?"

Why does the UK parliament need a vote on the political declaration?

Why has the US not been more assertive in confronting Russia in recent years?

How do I go from 300 unfinished/half written blog posts, to published posts?

Why do we use the plural of movies in this phrase "We went to the movies last night."?

How did the Bene Gesserit know how to make a Kwisatz Haderach?

Can we say or write : "No, it'sn't"?



How to fix this mysql permission problem?



The Next CEO of Stack OverflowMysql Database files read accessCrontab permission problemPermission denied writing to mysql logHow Remove permission denied with GRANT USAGE ON mysqlProblem with MySQL timezoneError 2002 MYSQL OS X 10.11User permissionshelp for user permissions and file directory access mac OS SierraMySQL SystemD Logfile Permission Deniedmysql after sudo su works; mysql or sudo mysql fails










1















I'm trying to get rails dbconsole to work (Rails 3.2.6). The problem is that when I run the command, I get:



gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': Permission denied -
/usr/local/bin/mysql (Errno::EACCES)


I am using OS X Lion, and the usual way of running mysql at the command line works - it just doesn't work through rails dbconsole. The permissions on the /usr/local/bin/mysql are:



$ ls -la /usr/local/bin/mysql
lrwxr-xr-x 1 root admin 16 Mar 13 20:27 /usr/local/bin/mysql -> /usr/local/mysql


The user I am calling these commands from is in the 'Admin' group (as evidenced in the Preferences -> Users dialog)



Any ideas on how to fix this? What could be the cause of mysql being able to run at the command line but not through another program (ruby/rails in this case).



And while I'm at this permissions problem, could you point me to a decent article/book/method that will help me to understand the permissions system and help troubleshoot such problems in future?










share|improve this question
























  • What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

    – Matthew Scharley
    Jun 16 '12 at 8:59











  • Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

    – Zabba
    Jun 16 '12 at 9:10






  • 1





    Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

    – Gilles
    Jun 17 '12 at 1:22















1















I'm trying to get rails dbconsole to work (Rails 3.2.6). The problem is that when I run the command, I get:



gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': Permission denied -
/usr/local/bin/mysql (Errno::EACCES)


I am using OS X Lion, and the usual way of running mysql at the command line works - it just doesn't work through rails dbconsole. The permissions on the /usr/local/bin/mysql are:



$ ls -la /usr/local/bin/mysql
lrwxr-xr-x 1 root admin 16 Mar 13 20:27 /usr/local/bin/mysql -> /usr/local/mysql


The user I am calling these commands from is in the 'Admin' group (as evidenced in the Preferences -> Users dialog)



Any ideas on how to fix this? What could be the cause of mysql being able to run at the command line but not through another program (ruby/rails in this case).



And while I'm at this permissions problem, could you point me to a decent article/book/method that will help me to understand the permissions system and help troubleshoot such problems in future?










share|improve this question
























  • What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

    – Matthew Scharley
    Jun 16 '12 at 8:59











  • Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

    – Zabba
    Jun 16 '12 at 9:10






  • 1





    Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

    – Gilles
    Jun 17 '12 at 1:22













1












1








1








I'm trying to get rails dbconsole to work (Rails 3.2.6). The problem is that when I run the command, I get:



gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': Permission denied -
/usr/local/bin/mysql (Errno::EACCES)


I am using OS X Lion, and the usual way of running mysql at the command line works - it just doesn't work through rails dbconsole. The permissions on the /usr/local/bin/mysql are:



$ ls -la /usr/local/bin/mysql
lrwxr-xr-x 1 root admin 16 Mar 13 20:27 /usr/local/bin/mysql -> /usr/local/mysql


The user I am calling these commands from is in the 'Admin' group (as evidenced in the Preferences -> Users dialog)



Any ideas on how to fix this? What could be the cause of mysql being able to run at the command line but not through another program (ruby/rails in this case).



And while I'm at this permissions problem, could you point me to a decent article/book/method that will help me to understand the permissions system and help troubleshoot such problems in future?










share|improve this question
















I'm trying to get rails dbconsole to work (Rails 3.2.6). The problem is that when I run the command, I get:



gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': Permission denied -
/usr/local/bin/mysql (Errno::EACCES)


I am using OS X Lion, and the usual way of running mysql at the command line works - it just doesn't work through rails dbconsole. The permissions on the /usr/local/bin/mysql are:



$ ls -la /usr/local/bin/mysql
lrwxr-xr-x 1 root admin 16 Mar 13 20:27 /usr/local/bin/mysql -> /usr/local/mysql


The user I am calling these commands from is in the 'Admin' group (as evidenced in the Preferences -> Users dialog)



Any ideas on how to fix this? What could be the cause of mysql being able to run at the command line but not through another program (ruby/rails in this case).



And while I'm at this permissions problem, could you point me to a decent article/book/method that will help me to understand the permissions system and help troubleshoot such problems in future?







permissions osx mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Rui F Ribeiro

41.8k1483142




41.8k1483142










asked Jun 16 '12 at 7:22









ZabbaZabba

12314




12314












  • What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

    – Matthew Scharley
    Jun 16 '12 at 8:59











  • Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

    – Zabba
    Jun 16 '12 at 9:10






  • 1





    Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

    – Gilles
    Jun 17 '12 at 1:22

















  • What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

    – Matthew Scharley
    Jun 16 '12 at 8:59











  • Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

    – Zabba
    Jun 16 '12 at 9:10






  • 1





    Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

    – Gilles
    Jun 17 '12 at 1:22
















What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

– Matthew Scharley
Jun 16 '12 at 8:59





What are the permissions on /usr/local/mysql? The permissions on a symlink mean precious little.

– Matthew Scharley
Jun 16 '12 at 8:59













Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

– Zabba
Jun 16 '12 at 9:10





Exactly the same permissions, but the group is wheel (the group for usr/local/bin/mysql is admin - as mentioned in the question)

– Zabba
Jun 16 '12 at 9:10




1




1





Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

– Gilles
Jun 17 '12 at 1:22





Please post the output of ls -ld /usr /usr/local /usr/local/mysql, of type mysql, and of head -n1 gems/railties-3.2.6/lib/rails/commands/dbconsole.rb.

– Gilles
Jun 17 '12 at 1:22










1 Answer
1






active

oldest

votes


















1














Conjecture: mysql doesn't run /usr/local/bin/mysql, but a mysql executable at some other location in $PATH. It is unusual to have /usr/local/mysql be an executable file: I would expect it to be a directory, if it exists at all. Run



type mysql


to see what mysql really runs, and if necessary, correct the /usr/local/bin/mysql symbolic link to point to the right place.



You can see what is really behind the symbolic link by adding the -L option to ls (and -d, in case it turns out to be a directory):



ls -lLd /usr/local/bin/mysql





share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f40921%2fhow-to-fix-this-mysql-permission-problem%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Conjecture: mysql doesn't run /usr/local/bin/mysql, but a mysql executable at some other location in $PATH. It is unusual to have /usr/local/mysql be an executable file: I would expect it to be a directory, if it exists at all. Run



    type mysql


    to see what mysql really runs, and if necessary, correct the /usr/local/bin/mysql symbolic link to point to the right place.



    You can see what is really behind the symbolic link by adding the -L option to ls (and -d, in case it turns out to be a directory):



    ls -lLd /usr/local/bin/mysql





    share|improve this answer



























      1














      Conjecture: mysql doesn't run /usr/local/bin/mysql, but a mysql executable at some other location in $PATH. It is unusual to have /usr/local/mysql be an executable file: I would expect it to be a directory, if it exists at all. Run



      type mysql


      to see what mysql really runs, and if necessary, correct the /usr/local/bin/mysql symbolic link to point to the right place.



      You can see what is really behind the symbolic link by adding the -L option to ls (and -d, in case it turns out to be a directory):



      ls -lLd /usr/local/bin/mysql





      share|improve this answer

























        1












        1








        1







        Conjecture: mysql doesn't run /usr/local/bin/mysql, but a mysql executable at some other location in $PATH. It is unusual to have /usr/local/mysql be an executable file: I would expect it to be a directory, if it exists at all. Run



        type mysql


        to see what mysql really runs, and if necessary, correct the /usr/local/bin/mysql symbolic link to point to the right place.



        You can see what is really behind the symbolic link by adding the -L option to ls (and -d, in case it turns out to be a directory):



        ls -lLd /usr/local/bin/mysql





        share|improve this answer













        Conjecture: mysql doesn't run /usr/local/bin/mysql, but a mysql executable at some other location in $PATH. It is unusual to have /usr/local/mysql be an executable file: I would expect it to be a directory, if it exists at all. Run



        type mysql


        to see what mysql really runs, and if necessary, correct the /usr/local/bin/mysql symbolic link to point to the right place.



        You can see what is really behind the symbolic link by adding the -L option to ls (and -d, in case it turns out to be a directory):



        ls -lLd /usr/local/bin/mysql






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 17 '12 at 1:23









        GillesGilles

        545k12811071622




        545k12811071622



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f40921%2fhow-to-fix-this-mysql-permission-problem%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.