Search code examples
mysqllinuxmanpage

How to be enable to use man command for mysql


I have recently encountered a problem in using the command man and the switch --help in mysql. Whenever I enter the command "man select" or .... or when I use the "select --help" I recieve this error message:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqld --verbose --help' at line 1

The fact is that neither the "man" command nor the "--help" switch work for any other command. My guess is that the man pages are not installed by my system. I use "ubuntu 14.04" and have installe my LAMP STACK via using the "apt-get install" command. Would you help me fix this issue? I thank you very much in advance.


Solution

  • From the OS command prompt (where you executed the apt-get):

    $ man mysql
    $ mysql --help
    

    From within the mysql client:

    mysql> help select