Changes between Initial Version and Version 1 of mysql_command_line_access


Ignore:
Timestamp:
Dec 21, 2010, 1:45:42 PM (10 years ago)
Author:
Ross
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mysql_command_line_access

    v1 v1  
     1[[PageOutline]]
     2= Mysql Command Line Access =
     3
     4In order to get command line access to mysql servers, each database must have a unique .my.cnf file specifying the database, username and password.
     5
     6== .my.cnf ==
     7
     8A .my.cnf file should have the following structure:
     9
     10{{{
     11[client]
     12user=USERNAME
     13password=PASSWORD
     14[mysql]
     15database=DATABASENAME
     16}}}
     17
     18Where USERNAME = the mysql_db user, PASSWORD = the mysql db_user password, and DATABASENAME = the mysql_db name.
     19
     20== Using multiple databases ==
     21
     22Each individual database should contain its own .my.cnf file.  You can access multiple databases by naming database specific files with .my.db_name.cnf and then issuing the mysql command:
     23
     24{{{
     25mysql --defaults-file=.my.db_name.cnf
     26}}}
     27