Connect with the same options as the previous example, but using the corresponding short option forms: : MySQL « Command MySQL « SQL / MySQL






Connect with the same options as the previous example, but using the corresponding short option forms:

       

shell> mysql -h localhost -p -u myname

   
    
    
    
    
    
    
  








Related examples in the same category

1.mysql Options
2.mysql Commands
3.Processing SQL Files with mysql
4.Change default-character-set for backup
5.Connect to the mysql database as the root user from the MySQL CLI
6.Connects the root account to the inventory database:
7.Connect to the MySQL database as root
8.Import a SQL-format dump file back into MySQL
9.If you dumped tables from a single database, you'll need to tell mysql which database to import them into
10.Verify whether the MySQL databases have been properly installed and configured.
11.Specify the user for mysql
12.To operate the mysql client utility in the context of the root user.
13.Specify a database when you start the mysql utility
14.To invoke mysql interactively from the command line, specify any necessary connection parameters after the command name
15.Provide a database name to select that database as the default database
16.Restoring a Single Database
17.Restoring Several Databases
18.Restoring a Database
19.Recreate the database in interactive mode:
20.Connect to the sampdb database on the local host and on cobra.snake.net:
21.Telling mysql to Read Queries from a File
22.MySQL Server and Included Administrative Tools
23.Common Options of the MySQL Client Tools
24.Producing HTML Output
25.Producing XML Output
26.Using the mysql Client to Export Data
27.Launching mysql with the option --silent:
28.XML Exporting with mysql
29.Sign into the MySQL server as root
30.The options part of the mysql command line might be empty
31.To determine the version of a program, use the --version option.
32.To determine the options supported by any MySQL program, invoke the program with the --help option.
33.Try out the various communication protocols
34.Find out which options will be taken from option files by mysql, use this command
35.Specifying Queries on the Command Line
36.To run multiple queries with the -e option, separate them with semicolons:
37.Getting Server Metadata
38.Produce output in formats other than tab-delimited
39.The prompt command supports a number of options that allow you to display the mysql prompt in various ways.
40.To connect to a server running on some other machine, it's necessary to specify the hostname using an -h option.
41.In many cases, a given option has both a long and a short form.
42.Generating HTML Tables