{"id":4637,"date":"2020-04-06T17:16:15","date_gmt":"2020-04-06T14:16:15","guid":{"rendered":"https:\/\/www.systemcodegeeks.com\/?p=4637"},"modified":"2020-04-06T12:31:16","modified_gmt":"2020-04-06T09:31:16","slug":"30-examples-of-mysql-commands-in-linux","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/","title":{"rendered":"30 Examples of MySQL Commands in Linux"},"content":{"rendered":"\n<p>Here is my list of some of the most useful\u00a0 <a href=\"http:\/\/javarevisited.blogspot.com\/search\/label\/mysql\">MySQL commands<\/a> which I have used in my day to day life while working with MySQL database in Linux. This comes straight from my notes so you may not find a lot of documentaries around it but they all are very useful. If you need to know more about any command you can always drop a note or look into resources I have shared at the end of this article. . You can also buy in just $10 which is very cost-effective to learn a useful skill like MySQL.<br><br><a name=\"more\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>1. For Checking Wheather MySQL Server is running on Linux or not<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:sql\">\n$ ps -auxwww | grep mysql\n<\/pre>\n\n\n\n<p>If it returns any row then MySQL server is running otherwise no. You can also check the output to verify its actually the MySQL server itself and not any other script which has MySQL in its name or command arguments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>2. Starting MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>Go to MySQL installation directory and execute below command<\/p>\n\n\n\n<pre class=\"brush:bash\">$ .\/bin\/mysqld_safe &amp;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>3. Stopping MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:bash\">\n$ cd mysql\/bin\n.\/mysqladmin -u root shutdown\n.\/mysqladmin --host=localhost --port=3305 -u root shutdown \/\/for second instance listening on port 3305\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>4. Viewing MySQL process list and killing the offending MySQL process<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br>This is extremely useful to see which query is running on which host, from which location query has fired, which query has locked which table, etc.<\/p>\n\n\n\n<pre class=\"brush:bash\">$ cd mysql\/bin<br><br>.\/mysqladmin -u root processlist<\/pre>\n\n\n\n<p>Kill MySQL processes<\/p>\n\n\n\n<pre class=\"brush:bash\">$ cd mysql\/bin<br><br>.\/mysqladmin -u root kill ProcessID<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>5. How to see MySQL help<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>you can see the MySQL help from command prompt itself like following, you just need to understand it.<\/p>\n\n\n\n<pre class=\"brush:bash\">mysql&gt; help alter;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>6. Repair a table in MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<pre class=\"brush:bash\">\nREPAIR TABLE TableName\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>7. Copying data from one table to another<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>This is very useful when you are altering the table and you would like to take the backup of data.<\/p>\n\n\n\n<pre class=\"brush:bash\">insert into ORDERS_TMP select * from ORDERS<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>8. Dropping columns from the table<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:bash\">ALTER TABLE `database`.`ORDERS` DROP COLUMN `BRAND`;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>9. Adding Keys(Indexes) to a table<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:bash\">alter table ORDERS add KEY `BY_CLIENT` (`CLIENT_ID`) (here CLIENT_ID is a column in ORDers table)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>10. modifying a column<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>This is useful in case you want to modify data type or size of a particular column<\/p>\n\n\n\n<pre class=\"brush:bash\">$ alter table ORDERS modify column BRAND varchar(15) default NULL<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>11. Rename Table<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>This is again a useful method for creating a backup of a table before playing with it.<br><br>Renaming the new table to the original name:<\/p>\n\n\n\n<pre class=\"brush:bash\">mysql&gt; ALTER TABLE new_table RENAME old_table;<\/pre>\n\n\n\n<p>Here are some more\u00a0 <b>MySQL\u00a0commands\u00a0<\/b>from which is very useful for anyone working with\u00a0 \u00a0 <b>MySQL database<\/b>. This\u00a0is\u00a0very useful for application developers which is going to use\u00a0MySQL\u00a0database for there applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>12. Increasing no of connections for&nbsp;MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>You can increase this value in&nbsp;the main&nbsp;config file (like&nbsp;<br>\/etc\/my.cnf) using this syntax:<\/p>\n\n\n\n<pre class=\"brush:bash\">[mysqld]<br><br>set-variable=max_connections=250<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>13. Myisamchk&nbsp;command<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>if you run &#8220;&#8216;myisamchk&nbsp;ORDERS.MYI&#8221; it will check whether ORDERS table is corrupted or not. if corrupted it will say<\/p>\n\n\n\n<pre class=\"brush:bash\">MyISAM-table 'ORDERS.MYI' is corrupted Fix it using switch \"-r\" or \"-o\"<\/pre>\n\n\n\n<p>to fix it you can run<\/p>\n\n\n\n<pre class=\"brush:bash\">\"'myisamchk&nbsp;-r ORDERS.MYI\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>14. UNIX_TIMESTAMP function<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:bash\">SELECT UNIX_TIMESTAMP('1997-10-04 22:23:00'); -> 875996580<\/pre>\n\n\n\n<p>give the date and will return no of seconds, it returns the value of the  argument as seconds since &#8216;1970-01-01 00:00:00&#8217; UTC<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>15. Diff between 2 dates in MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<pre class=\"brush:bash\">\nmysql&gt; SELECT TIMEDIFF('1997-12-31 23:59:59.000001','1997-12-30 01:01:01.000002');\n      -&gt; '46:58:57.999999'\n<\/pre>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\"><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><b>16. Returns Time to seconds<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>Returns the time argument, converted to seconds.<\/p>\n\n\n\n<pre class=\"brush:bash\">\nmysql&gt; SELECT TIME_TO_SEC('22:23:00');\n        -&gt; 80580\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>17. UNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br><br>If called with no argument, returns a Unix timestamp (seconds since &#8216;1970-01-01 00:00:00&#8217; UTC) as an unsigned integer. If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since &#8216;1970-01-01 00:00:00&#8217; UTC.<\/p>\n\n\n\n<p>The date&nbsp;may be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or YYYYMMDD. The server interprets date as a value in the current time zone and converts it to an internal value in UTC. Clients can set their time zone<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>18. TAKING THE BACKUP OF A TABLE<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<pre class=\"brush:sql\">$ CREATE TABLE ORDER_TEMP SELECT * FROM ORDER;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>19. Running mysql query from unix command prompt<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:sql\">mysql -u root -h &lt;hostname&gt;&nbsp; &lt;database name &gt;-e \"UPDATE ORDERT SET TYPE ='PARTIAL' WHERE TYPE='FULL'<\/pre>\n\n\n\n<p>-h for host and \u2013e for expression.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>20. Showing list of databases in MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p>mysql&gt; show databases;<\/p>\n\n\n\n<p>Hi\u00a0Guys,\u00a0here are some more\u00a0<b>MySQL\u00a0commands<\/b>\u00a0which\u00a0are\u00a0useful\u00a0for\u00a0day\u00a02-day\u00a0work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>21. Method for converting the current timestamp to date:<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p>select from_unixtime(left(1201159475416, 10));<\/p>\n\n\n\n<p>this method&nbsp;is used to convert the timestamp to the date-time format in&nbsp;MySQL, the left() method will return 10 char from the specified&nbsp;string if&nbsp;we store timestamp value in&nbsp;a millisecond.<\/p>\n\n\n\n<pre class=\"brush:bash\">\nmysql&gt; select from_unixtime(left(1210916129820  , 10))\n    -&gt; ;\n+------------------------------------------+\n| from_unixtime(left(1210916129820  , 10)) |\n+------------------------------------------+\n| 2008-05-16 01:35:29                      |\n+------------------------------------------+\n1 row in set (0.00 sec)\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>22. Viewing&nbsp;MySQL&nbsp;command history<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<p>There is one hidden file called&nbsp;.mysql-history, on&nbsp;which all commands are stored which we typed in&nbsp; MySQL console. It generally resides in&nbsp;the home&nbsp;directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>23. Taking&nbsp;a backup&nbsp;of the MyISAM database in&nbsp;MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p>There\u00a0are\u00a0multiple\u00a0ways\u00a0to take a backup of\u00a0 MyISAM tables in\u00a0MySQL\u00a0like using\u00a0 <a href=\"http:\/\/javarevisited.blogspot.com\/2010\/10\/mysqldump-utility-in-mysql.html\">mysqldumb<\/a>.<\/p>\n\n\n\n<p>One way to take the backup of a database to copy the&nbsp;files.MYD,.MYI and .frm, this way you can write scripts that can copy&nbsp;the database&nbsp;from one server to&nbsp;another,&nbsp;merge databases, etc.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>24. To remove a column from&nbsp;a table<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<pre class=\"brush:bash\">$ alter table ice cream drop column flavor ;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>25. Changing the size&nbsp;of a&nbsp;column&nbsp;and datatype of a&nbsp;column&nbsp;in&nbsp;MySQL<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<pre class=\"brush:bash\">\n$ alter table people modify name VARCHAR(35) ;\n$ alter table ORDERS modify CLIENT  varchar(255) default NULL;\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>26. Displaying index from a&nbsp;MySQL&nbsp;table<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<pre class=\"brush:bash\">mysql&gt; SHOW INDEX FROM&nbsp;&nbsp; database.ORDERS;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>27. Getting&nbsp;MySQL&nbsp;server version<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<p>you can use method called version()<\/p>\n\n\n\n<p>mysql> select version();<\/p>\n\n\n\n<pre class=\"brush:bash\">\nmysql&gt; select version();\n+-----------+\n| version() |\n+-----------+\n| 3.23.58 |\n+-----------+\n1 row in set (0.02 sec)\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><b>28. mysqldump Command<\/b><\/h3>\n\n\n\n<p><b>&#8212;&#8212;&#8212;-<\/b><\/p>\n\n\n\n<p>The\u00a0 <b>mysqldump client is a backup program<\/b>\u00a0o It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>29. To take a dump of a MySQL table-use below command<\/b><\/h3>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n\n\n<pre class=\"brush:bash\">~\/MySQL\/bin\/mysqldump -u root&nbsp; database_name ORDERS &gt; orders.txt<\/pre>\n\n\n\n<p>1.&nbsp; command to dumb&nbsp; only tables definitions, not the data \u201c used the command\u201d&nbsp; if the path is not set then you need to run that command from MySQL\/bin directory<\/p>\n\n\n\n<pre class=\"brush:bash\">.\/mysqldump -d -u root database_name&nbsp; ORDERS , CLIENTS , COMPANY&nbsp; &gt; ~\/tmp\/test.database.sql<\/pre>\n\n\n\n<p>2. Command to recreate table from that file<\/p>\n\n\n\n<p><b>mysql -u root database_name &lt; ~\/tmp\/test.database.sql<\/b><\/p>\n\n\n\n<p>Thanks for reading this article so far. If you find these MySQL commands useful then please share with your friends and colleagues. If you have any questions or feedback then please drop a note.&nbsp;<\/p>\n\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on System Code Geeks with permission by Javin Paul, partner at our <a href=\"\/\/www.systemcodegeeks.com\/join-us\/scg\/\" target=\"_blank\" rel=\"noopener noreferrer\">SCG program<\/a>. See the original article here: <a href=\"http:\/\/javarevisited.blogspot.com\/2020\/03\/30-examples-of-mysql-commands-in-linux.html\" target=\"_blank\" rel=\"noopener noreferrer\">30 Examples of MySQL Commands in Linux<\/a><\/p>\n<p>Opinions expressed by System Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here is my list of some of the most useful\u00a0 MySQL commands which I have used in my day to day life while working with MySQL database in Linux. This comes straight from my notes so you may not find a lot of documentaries around it but they all are very useful. If you need &hellip;<\/p>\n","protected":false},"author":18,"featured_media":192,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[174],"class_list":["post-4637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>30 Examples of MySQL Commands in Linux - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"30 Examples of MySQL Commands in Linux - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-06T14:16:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Javin Paul\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Javin Paul\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\"},\"author\":{\"name\":\"Javin Paul\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/6ef28acba02a0c319e609fd9239d952f\"},\"headline\":\"30 Examples of MySQL Commands in Linux\",\"datePublished\":\"2020-04-06T14:16:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\"},\"wordCount\":1022,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"keywords\":[\"MySQL\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\",\"name\":\"30 Examples of MySQL Commands in Linux - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"datePublished\":\"2020-04-06T14:16:15+00:00\",\"description\":\"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/linux\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"30 Examples of MySQL Commands in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/6ef28acba02a0c319e609fd9239d952f\",\"name\":\"Javin Paul\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dc70a0e0b9d5c6614098936b017d6c79ed7f3e0c315a1e59d7d300e4c46d726c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dc70a0e0b9d5c6614098936b017d6c79ed7f3e0c315a1e59d7d300e4c46d726c?s=96&d=mm&r=g\",\"caption\":\"Javin Paul\"},\"sameAs\":[\"http:\/\/javarevisited.blogspot.com\/\"],\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/javin-paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"30 Examples of MySQL Commands in Linux - System Code Geeks - 2026","description":"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"30 Examples of MySQL Commands in Linux - System Code Geeks - 2026","og_description":"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples","og_url":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_published_time":"2020-04-06T14:16:15+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","type":"image\/jpeg"}],"author":"Javin Paul","twitter_card":"summary_large_image","twitter_creator":"@systemcodegeeks","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Javin Paul","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/"},"author":{"name":"Javin Paul","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/6ef28acba02a0c319e609fd9239d952f"},"headline":"30 Examples of MySQL Commands in Linux","datePublished":"2020-04-06T14:16:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/"},"wordCount":1022,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","keywords":["MySQL"],"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/","url":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/","name":"30 Examples of MySQL Commands in Linux - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","datePublished":"2020-04-06T14:16:15+00:00","description":"Interested to learn about MySQL Commands? Check our article presenting 30 Examples of MySQL Commands in Linux with examples","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/linux-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/linux\/30-examples-of-mysql-commands-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Linux","item":"https:\/\/www.systemcodegeeks.com\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"30 Examples of MySQL Commands in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/6ef28acba02a0c319e609fd9239d952f","name":"Javin Paul","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dc70a0e0b9d5c6614098936b017d6c79ed7f3e0c315a1e59d7d300e4c46d726c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc70a0e0b9d5c6614098936b017d6c79ed7f3e0c315a1e59d7d300e4c46d726c?s=96&d=mm&r=g","caption":"Javin Paul"},"sameAs":["http:\/\/javarevisited.blogspot.com\/"],"url":"https:\/\/www.systemcodegeeks.com\/author\/javin-paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/4637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=4637"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/4637\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/192"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=4637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=4637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=4637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}