MySQLi Articles - Page 5 of 341

Enable TLS for MySQL Clients

AmitDiwan
Updated on 10-Mar-2021 09:03:36

469 Views

TLS is also known as SSL (Secure Sockets Layer). It refers to Transport Layer Security.When there is an unencrypted connection between the MySQL client and the server, a person who has access to the network can watch all the traffic and inspect the data that is being sent or received between client and server. When the user wishes to move information over a network in a secure method, an unencrypted connection is not acceptable.To make any sort of data unreadable, encryption has to be used. Encryption algorithms usually include security elements that help resist many kinds of known attacks, some ... Read More

MySQL Option Defaults, Options Expecting Values, and the = Sign

AmitDiwan
Updated on 09-Mar-2021 13:50:08

129 Views

Let us understand the default options, the options that expects values, and the ‘=’ sign in MySQL −By convention, the long forms of options which assign a value are written using an equals (=) sign. It has been shown below −mysql --host=tonfisk --user=jonFor options which require a value, i.e which doesn’t have a default value, the equal sign isn’t required. This means that the below command would be valid in such cases −mysql --host tonfisk --user jonIn both the above cases, the mysql client tries to connect to a MySQL server that is running on the host named “tonfisk” with ... Read More

Using Options to Set MySQL Program Variables

AmitDiwan
Updated on 09-Mar-2021 13:46:59

409 Views

Many of the MySQL programs have internal variables that are set during runtime using the SET statement. Most of these program variables can also be set at server startup with the help of the same syntax that applies to specifying the program options.Example 1The mysql has a max_allowed_packet variable which controls the maximum size of its communication buffer.To set this max_allowed_packet variable for mysql to a value of 16MB, either of the below mentioned commands can be used −mysql --max_allowed_packet=16777216 (or) mysql --max_allowed_packet=16MThe first command specifies the value in terms of bytes. On the other hand, the second command specifies ... Read More

MySQL Program Option Modifiers

AmitDiwan
Updated on 09-Mar-2021 13:46:13

404 Views

Some options are “boolean” and control the behavior which can be turned on or off.ExampleThe mysql client supports a --column-names option which tells whether or not to display a row of column names at the beginning of the query results.By default, this option is enabled. But sometimes, it may be required to disable this. This could be while sending the output of mysql into another program which is expecting to see only data and not the initial header line.To disable column names, the options can be specified in any of the below mentioned forms −Query--disable-column-names (or) --skip-column-names (or) --column-names=0The --disable ... Read More

MySQL Command-Line Options that Affect Option-File Handling

AmitDiwan
Updated on 09-Mar-2021 13:43:29

314 Views

Let us understand how MySQL command line options affect option file handling −Many of the MySQL programs which support option files handle the below options. Since these options affect option-file handling, they must be provided on the command line and not in an option ile. For it to work properly, each of these options must be provided before other options, with the below mentioned exceptions −−−print−defaults should be used immediately after −−defaults−file, −−defaults−extra−file, or −−loginpath.On Windows, if the server startup is done with the --defaults-file and --install options, --install must be first.--defaults-extra-file=file_nameOn Unix, read the above line in option file ... Read More

Using Option Files for MySQL programs? Usage of Option Files

AmitDiwan
Updated on 09-Mar-2021 13:41:08

413 Views

Let us understand how option files can be used with MySQL programs −Most MySQL programs can read the startup options from option files, which is also known as the configuration files.Option files provide an easy way to specify commonly used options so that they need not be entered on the command line every time the user runs a program.To know whether a program reads option files or not, it can be invoked with the help of the −−help option.For mysqld, the −−verbose and –help can be used.If the program reads option files, the help message indicates the files that it ... Read More

Using Options on the Command Line for MySQL programs?

AmitDiwan
Updated on 09-Mar-2021 13:39:37

341 Views

Let us understand how to use options on command line for MySQL programs −The program options which are specified on the command line follow the below rules −The options are given after the command name.An option argument begins with one dash or two dashes, and this depends on whether it is a short form or long form of the option name.Many options have both short and long forms. Let us take an example to understand this − −? and −−help are the short and long forms of the option which instructs a MySQL program to display the help message.The option ... Read More

Invoking MySQL Programs

AmitDiwan
Updated on 09-Mar-2021 13:37:30

346 Views

A MySQL program can be invoked from the command line (i.e, from your shell or command prompt).How to invoke?This can be done by entering the program name followed by any options or arguments that would be needed to instruct the program to do what the user wants.The below commands show some sample program invocations. The ‘shell>’ represents the prompt for the command interpreter; which is not part of what the user types. The specific prompt seen by user depends on their command interpreter.Typical prompts are $ for sh, ksh, or bash, % for csh or tcsh, and C:\> for the ... Read More

Overview of MySQL Programs

AmitDiwan
Updated on 09-Mar-2021 13:37:03

403 Views

There are many programs in a MySQL installation. Let us see an overview of some of the programs. Some programs are platform−specific, which means they are not present in all of MySQL distributions.Every MySQL program takes different options. There is a ‘- - help’ option that can be used to get a description of the program’s different options. The default option values can be overridden for MySQL program, by specifying options on command line or in an option file.Every MySQL program takes different options. There is a ‘- - help’ option that can be used to get a description of ... Read More

Working with AUTO_INCREMENT Columns in MySQL

AmitDiwan
Updated on 09-Mar-2021 13:34:27

218 Views

Let us understand how to work with AUTO_INCREMENT columns in MySQL −The AUTO_INCREMENT attribute is used to generate a unique identify for new rows. Let us see how this statement works. Before that, consider the below query −QueryCREATE TABLE tableName (    id MEDIUMINT NOT NULL AUTO_INCREMENT,    name CHAR(30) NOT NULL, PRIMARY KEY (id) ); INSERT INTO tableName (name) VALUES (‘val1’), ('val2'), ('val3'), ('val4'); SELECT * FROM tableName;Output+----+---------+ | id | name | +----+---------+ | 1 | val1 | | 2 | val2 | | ... Read More

Previous 1 ... 3 4 5 6 7 ... 341 Next
Advertisements