» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2006, 07:54 AM
Delilah Delilah is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Delilah is on a distinguished road
Default how to automate mysql cmd?

I have an /etc/my.cnf file configured with the options
socket=/var/lib/mysql/mysql.sock
datadir=/export/disk1/mysql_db

I su to the user mysql from root and run
$>mysql --sockets=/var.... --datadir=/exp... -u root
This works fine.

Running $>mysql without the options it fails as it goes back to the default socket and datadir settings.

How can I get these settings to be the defaults?
Any help greatly appreciated. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-16-2006, 07:58 AM
Sague Sague is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sague is on a distinguished road
Default

The my.cnf file has a number of "sections", introduced by lines like "[mysqld]" or "[mysql]". The config entries within the section apply to the program of the corresponding name. You need to define the socket and datadir in both the [mysqld] and [mysql] sections.

And', both the server and the client need to agree on the location of the socket file, so they can use that file for locally-optimized interprocess communication. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL failing? Blinck MySQL Forums 1 01-04-2007 07:08 AM
Getting MySQL & PHP to communicate JCH MySQL Forums 0 05-29-2006 02:52 PM
Alcatel Selects MySQL AB outsourcingplans Web Hosting News 0 12-13-2005 05:03 PM
MySQL 5 and MySQL 4.1 on One Machine ?? omen MySQL Forums 1 12-09-2005 07:07 AM
MySQL 5.1.3-alpha has been released gunet MySQL Forums 0 12-09-2005 04:55 AM


All times are GMT. The time now is 12:37 PM.