
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6705 Articles for Database

1K+ Views
With the help of ‘mysqladmin’ along with ‘status’ option program we would be able to check the status of MySQL server. It can be used as follows on command line −C:\mysql\bin>mysqladmin -u root status Uptime: 3865 Threads: 1 Questions: 50 Slow queries: 0 Opens: 113 Flush tables: 1 Open tables: 102 Queries per second avg: 0.012

176 Views
MySQL database provides us the following programs as administrative tools to manage MySQL server −mysqldIt is also known as MySQL server daemon. It is the main program that does most of the work in a MySQL installation. We need to use ‘mysqld’ to start our MySQL server. It is having many options that can be specified at the time of startup.mysqladminProcessing Re-write Suggestions Done (Unique Article)Basically ‘mysqladmin’ could be a client for playacting administrative operations. we are able to use it to see the server’s configuration and current status, to create and drop databases, and plenty of a lot of.For ... Read More

480 Views
With the help of ‘mysqladmin’ program we would be able to shutdown our MySQL server. It can be used as follows on command line −C:\mysql\bin>mysqladmin -u root shutdownWe will see nothing after entering the above command because it will not print any message in command window. We should have to trust that MySQL server has been shutdown properly.

476 Views
With the help of ‘mysqladmin’ program we would be able to know about the version of our MySQL server. To get the version we should have to write the following command on command line −C:\mysql\bin>mysqladmin -u root version mysqladmin Ver 8.42 Distrib 5.7.20, for Win64 on x86_64 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.7.20 Protocol version 10 Connection localhost via TCP/IP TCP port ... Read More

359 Views
With the help of ‘mysqladmin’ program, we would be able to know whether our MySQLserver is alive or not. It can be used as follows on the command line −C:\mysql\bin>mysqladmin -u root ping mysqld is aliveThe message after running the command shows that our MySQL server is alive.

520 Views
There are following two methods to start MySQL server −Using Command LineWe need to run ‘mysqld’ program to run MySQL server. It can be started using the command line with the help of the following command −C:\mysql\bin>mysqldWe will see nothing after entering the ‘mysqld’ command because it will not print any message in the command window. We should have to trust that MySQL server is running now.Using file explorer windowWe can also start MySQL server by double-clicking the file \mysql\bin\mysqld.exe on our computer.

193 Views
As we know that, MySQL OCTET_LENGTH() function also measures the string length in ‘bytes’ hence, it is the synonym of MySQL LENGTH() function. The syntax of this function is OCTET_LENGTH(Str) where Str is a string whose length in characters has to be returned.It is also not multi-byte safe like LENGTH() function. For example, if a string contains four 2-bytes characters then OCTET_LENGTH() function will return 8. It is demonstrated in the example below −Examplemysql> Select OCTET_LENGTH('tutorialspoint'); +--------------------------------+ | OCTET_LENGTH('tutorialspoint') | +--------------------------------+ | 14 | +--------------------------------+ 1 ... Read More

183 Views
MySQL SUBSTRING_INDEX() function will return the same string as output if the argument ‘count’ has the value greater than the total number of occurrences of delimiter. It can be demonstrated with the following example −mysql> Select SUBSTRING_INDEX('www.google.co.in','.',4); +-------------------------------------------+ | SUBSTRING_INDEX('www.google.co.in','.',4) | +-------------------------------------------+ | www.google.co.in | +-------------------------------------------+ 1 row in set (0.00 sec)The above query returns the same string because 4 is greater than the total number of occurrences of delimiter provided as argument i.e. ‘.’.

206 Views
If we want to compare the data values of two columns then we need to provide the name of the columns as arguments of MySQL STRCMP() function. Suppose we have a table named ‘Marks’ which contains the name of the student and their secured marks in different subjects. Now, if we want to know that a particular student has got more or less or equal marks in two subjects then it can be illustrated using STRCMP() function as follows −Examplemysql> Select Name, STRCMP(Math, Hindi) from student marks WHERE Name = 'Rahul'; +-------+--------------------+ | Name | STRCMP(Math, Hindi) | +-------+--------------------+ | ... Read More

140 Views
For the purpose of comparison, we can use number values as an argument in STRCMP() function. They are given as arguments without quotes. Following example will demonstrate it.Examplemysql> Select STRCMP(10, 10)As 'Equal Numbers', STRCMP(11, 10)AS '2nd Smaller', STRCMP(10, 11)AS '1st Smaller', STRCMP(10, NULL)As '2nd NULL', STRCMP(NULL, 10)AS '1st NULL', STRCMP(NULL, NULL)AS 'Both NULL'; +---------------+-------------+-------------+----------+----------+-----------+ | Equal Numbers | 2nd Smaller | 1st Smaller | 2nd NULL | 1st NULL | Both NULL | +---------------+-------------+-------------+----------+----------+-----------+ | 0 | 1 | -1 | NULL | ... Read More