Help with MySql Login on Linux/Gnome Terminal

  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

Perhaps I should post this in another thread... but of well...

--------------------------------------------------------------------------------

We had a guy install php and mysql on our Linux server (running Red Hat) and I am ready to start playing around with it.... one problem... I can't seem to login...

Right now I am launching a Gnome terminal window and trying to do: "-u root -p" and I can't get anything other than "bash : not a command"... i have tried the mysql -u root, mysql -uroot, etc., etc... no long just get a "bash:" statment return.

Could someone help me from the very beginning... I just remember the guy that installed it said... "Hey you need to create a user account and login with this root information to do it".... this was several months ago and I am now just getting to it... I'm not sure if I need to be in a certain folder to even run the mysql -u command.... i'm lost and can't seem to find any of this on the web.



Help?

Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

type "which mysql"

If it doesn't give you the location of mysql, its not in your path.

You may also want get a list of running processes by typing something like "ps -ef". Is mysqld running?
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

cool.... I'll go try that on our server... be back in a sec with results.

thanks
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

after which mysql I get this:

[root@www root]# which mysql
/usr/bin/which: no mysql in
(/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)


Also... no mysqld in the ps -ef command results.


hmmmm... perhaps it isn't started... so I researched and ran this and got this...

[root@www root]# /etc/rc.d/init.d/mysql start
[root@www root]# Starting mysqld daemon with databases from /var/lib/mysql

but now I am stuck what next?
  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

What distribution/version of linux are you using?
Nevermind, i see you said you are running redhat

my mysql is in /usr/bin


Try searching for mysql

The way I am going to tell you to do this will probably make linux experts cringe, but its the way I know how to do it:

type updatedb

then

type locate mysql | more
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

yes I found several mysql files in user/bin.

I am trying to get an mysql prompt so that I can login as root and I don't know the basics to get there....

thanks...
  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

yes, i understand.


if you have a mysql in your user/bin directory, try typing

/user/bin/mysql -u root -p


but, I am skeptical because when you typed which mysql it said there is no mysql in /usr/bin:

[root@www root]# which mysql
/usr/bin/which: no mysql in
(/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

Thanks for your patience....

I will go try that... but I did notice I don't have a "mysql" on there but rather a "mysql_safe" file

Here's what I have:

<img src="http://www.flower-mound.com/mysql.jpg">

I would run your linux find command but you mentioned that experts would cringe... I'm such a newbie though... if I run your command... do I run a risk of messing up my server (since it currently is serving webpages right now)?

sorry... i'm just a litte paranoid....

thanks...
  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

Quote:
I would run your linux find command but you mentioned that experts would cringe... I'm such a newbie though... if I run your command... do I run a risk of messing up my server


No, no risks :)

I just think more expert people would probably do it by combining grep and cat (or something like that)

Anyway, it doesn't look like "mysql" is in that directory, but it certainly looks like mysql is installed. Where the hell is "mysql"? I have no idea. Try searching for it. Could it have been accidently deleted?
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

oh... okay... thanks.... I will check that out today.


Well.. the commands just resulted in a blinking cursor... hmmmm...

Did a search through redhat/gnome gui and found several mysql folders, 1 program type (in the rc.d/init.d/ folder), and one unknown type.

I don't get it. I can start it but I don't get a msql prompt when I run the mysql start command in the etc/rc.d/init.d/ folder.

hmmmm

here's what I got in the red hat search...

(icons)
folder mysql /var/lib/
folder mysql /var/lib/mysql
program mysql /etc/rc.d/init.d
unkown type mysql /etc/logrotate.d
folder mysql /root/php/php-4.3.1./ext
folder mysql /user/lib
folder mysql /usr/share
folder mysql /usr/local/lib/php/tests/DB/tests
  • Cafu
  • Student
  • Student
  • Cafu
  • Posts: 97

Post 3+ Months Ago

Quote:
I don't get it. I can start it but I don't get a msql prompt when I run the mysql start command in the etc/rc.d/init.d/ folder.


The one in the etc/rc.d/init.d/ is mysqld. The "d" stands for daemon. When you start this one you are starting the database server.

It seems MySQL is installed, but you can't find the "mysql" program anywahere. At this point I'd have to guess it was deleted.

If you have another computer there installed the same way, you could probably just copy it from the other /usr/bin directory to your /usr/bin directory. Otherwise I guess I'd try reinstalling it.

To use a windows analogy, it seems you have a full install of Microsoft Office, but then someone deleted winword.exe
  • dangermon
  • Novice
  • Novice
  • dangermon
  • Posts: 16

Post 3+ Months Ago

Thanks for all of your help Cafu.... I appreciate all of your help on this.

"Cafu"... hmmmm Brazilian soccer fan? Thought it might be a reference.

Oh well... I can't believe it was deleted because no one gets on that computer except for me... perhaps the contractor deleted it.... very weird.

I don't spend a lot of time on the server but thanks for letting me know what you think has happened.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

what flavor *nix is it? (RedHat, Debian, Slackware, ect)

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 103 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.