LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2009, 08:57 PM   #1
tego90
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Rep: Reputation: 0
Problem Invoking MySql From the Shell Prompt


Greetings,

I am absolutely new to Linux, but I am leaning toward it as my preferred OS. I am trying to configure MySql so that I can invoke it by just typing Mysql at the prompt.

I have tried to include the path to the install directory, but I cannot get it to work.

However, If I type /usr/local/mysql/bin/mysql, it is properly invoked.

I have added: PATH=$PATH:/usr/local/mysql/bin to a section of /etc/profile, but it still does not work. I think the message I get said something like: bash: command not found.

I would greatly appreciate any help I can get to resolve this matter

I am running Fedora 10 Server using bash shell.

Thanks a million.

Tego

Last edited by tego90; 04-02-2009 at 09:18 PM.
 
Old 04-02-2009, 10:56 PM   #2
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
MySQL is actually a server, so you have to launch mysqld (the 'd' stands for daemon, meaning that it runs in the background).

In Fedora you can set MySQL to launch at boot time in the System -> Administration -> Services menus. Based on your path (/usr/local/mysql/bin/mysql) it seems that you have installed a custom-built version of MySQL. It is my advise to install the Fedora package for MySQL with yum or with the Add/Remove Application tool.

Anyway, a properly installed MySQL would be launched as root by doing '/etc/init.d/mysqld start' (for RedHat-derivates like Fedora; Debian and others have it differently).

Last edited by Tinkster; 10-30-2010 at 04:30 PM.
 
Old 04-03-2009, 11:01 AM   #3
tego90
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Maresmasb,

I do have MySQL properly installed - in my opinion - and properly starting on boot up. What I am trying to do is invoke the application from the shell prompt.

I can get to it by typing /usr/local/mysql/bin/mysql - works beautifully.

However, if I try by just typing mysql from the shell prompt, it returns the following message: bash: mysql: command not found.

My objective is to be able to set the environment variable correctly. Once I am able to do that, I'll get a sense of understanding what's going on.

As a matter of fact, I did the installation from source, because I wanted to get a better feel for what is going on, and I do feel good about it. I just want to get this part accomplished, which will make it even more satisfying.

Thanks for replying to my post - much appreciated.

Tego90
 
Old 04-03-2009, 07:07 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
If you edited /etc/profile, show us that, in code tags please.
 
Old 04-09-2009, 07:16 PM   #5
tego90
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Chris,

Thanks for responding to my post. I was able to get it working beautifully.

I added the absolute path /usr/local/mysql/bin/ to the end of the /etc/profile file, just above the export line.

Again, I do appreciate your response, and sorry for the late reply.

Tego90
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem invoking a wine application from a desktop icon josephj Linux - Software 2 11-25-2008 02:07 PM
problem in invoking interrupt handler for serial port in 2.4.21-ELsmp Redhat linux mrinal mishra Linux - Kernel 1 08-15-2006 03:52 PM
Problem invoking user mago Linux - General 4 03-29-2005 05:25 PM
MySQL command prompt (/usr/local/mysql missing) sankar555 Linux - Software 3 03-22-2003 01:48 PM
Serial Port Driver- Interrupt Invoking Problem sinux Linux - Software 0 03-07-2003 04:47 PM


All times are GMT -5. The time now is 06:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration