Meidokon Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Useful(?) links

  • furinkan's stuff

  • Postfix snippets


  • SystemInfo

  • This sidebar

Navigation

  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents
Revision 1 as of 2021-10-07 03:27:19
MeidokonWiki:
  • mysql_my_cnf

We do it this way because you want to use your credentials with every client tool you use, but you only want to select that specific DB when using the interactive mysql CLI client.

If you put database in the client section, then that'd get activated with other tools like mysqldump as well. You probably don't want that happening without being specifically requested.

This file should be prepared as follows:

touch ~/.my.cnf
chmod 0600 ~/.my.cnf

with the following content:

[client]
user=yourusername
password=yourpassword

[mysql]
database=theDbYouUseAllTheTime
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01
MoinMoin Release 1.9.11 [Revision release], Copyright by Juergen Hermann et al.