Remote Client Connection : mysql « MySQL Utilities « MySQL Tutorial

Home
MySQL Tutorial
1.Introduction
2.Select Query
3.Database
4.Table
5.Table Join
6.Subquery
7.Insert Update Delete
8.Logic Operator
9.View
10.Data Types
11.Procedure Function
12.Cursor
13.Trigger
14.Date Time Functions
15.Comparison Functions Operators
16.Aggregate Functions
17.Cast Functions Operators
18.Control Flow Functions
19.Encryption Compression Functions
20.Information Functions
21.Math Numeric Functions
22.Miscellaneous Functions
23.String Functions
24.Regular Expressions
25.Data Dictionary
26.MySQL Utilities
27.Privilege
MySQL Tutorial » MySQL Utilities » mysql 




If you have set the privileges to allow remote connections to a database, you can connect from a remote command line client by using the -h flag:

c:\mysql\bin\mysql -u <username> -p -h <host>
c:\mysql\bin\mysql -u admin -p -h my.myserver.com














26.3.mysql
26.3.1.To see a list of options provided by mysql, invoke it with the --help option:
26.3.2.Logging In with mysql
26.3.3.Remote Client Connection
26.3.4.If you are logging in on the same machine that MySQL is running on, you can omit the host.
26.3.5.If anonymous (unnamed) user is allowed, you should be able to connect to that server by invoking mysql without any options:
26.3.6.Supply your password on the command line after the -p option.
26.3.7.You can select the database on the command line when you invoke mysql.
26.3.8.Non-Interactive Commands
26.3.9.Using mysql in Batch Mode
26.3.10.To escape some special characters in the file
26.3.11.If you need to specify connection parameters on the command line in batch mode
26.3.12.Continue even if errors in batch mode, you should use the --force command-line option
26.3.13.Run the output through a pager
26.3.14.You can catch the output in a file for further processing
26.3.15.Use scripts from the mysql prompt by using the source command or \. command
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.