SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 6th, 2000, 04:59 AM
m. lopez m. lopez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 28 m. lopez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 3 m 51 sec
Reputation Power: 0
I established a user 'root' and a p.w. for MySQL real early during installation (possibly a confussion of mine).

Using that p.w., I can log into MySQL and work with the "mysql>" prompt.

But when I invoke, as LINUX root-user, at a terminal's LINUX prompt:

"mysqladmin version", the response is:

"Access denied for user: 'root@localhost' (Using password: NO)'

The password I gave to "root" of MySQL is different from the LINUX root password.

I understand that 'root' of LINUX and passwords are completely different things from users and passwords of MySQL.

How do we communicate with MySQL, from the LINUX prompt, (who we are) and (our MySQL password), so as to access the "mysqladmin" program??

Thanks for helping.

Reply With Quote
  #2  
Old May 6th, 2000, 08:56 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
You have to specify the password whenever you connect.

mysqladmin version -u root -ppassword

Reply With Quote
  #3  
Old May 6th, 2000, 11:23 AM
m. lopez m. lopez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 28 m. lopez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 3 m 51 sec
Reputation Power: 0
Thankyou, rod k, your answer was good.

Reply With Quote
  #4  
Old May 6th, 2000, 02:04 PM
m. lopez m. lopez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 28 m. lopez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 3 m 51 sec
Reputation Power: 0
In the above circumstances, I have to provide user and p.w. data for every access from the Linux prompt, and that works fine.

However, is there a way to "connect" and "remain connected" to the database from the Linux prompt?

Also, in a brief way, how would an application running under Linux remain connected, so it queries, modifies, etc., without passwording on each access?

Thanks for answering.


Reply With Quote
  #5  
Old May 9th, 2000, 02:40 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 2 m 4 sec
Reputation Power: 44
To connect to mysql normally, you would use 'mysql', not 'mysqladmin'.

mysql -u root -p

or mysql -u root -h [hostname] -p

would prompt for the root password, and then you will have a mysql> prompt, which you can keep open as long as you like, and close when done with 'quit'.

For an application running under Linux to connect to MySQL depends on what exactly you mean by that. Are you developing this application? Then you need to learn the MySLQ API. If you mean a previously developed client application, that depends on how that application was created. Basically, however, if your software tool can hold the username and password as a configuration, then you could start it up without specifying username and password every time.

In PHP, I use one include file to specify username, hostname, and password, and all other places I access the database, I just refer to that file.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > COMMANDS TO MYSQL FROM LINUX O.S.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway