DevArticles.In

Tips, Tricks, References and Bookmarks

  • Home
  • Hindi to Unicode
  • About
  • Contact

Category: MySQL

How to select or update MySQL table rows by even or odd number field value

Arvind KumarMySQLLeave a Comment on How to select or update MySQL table rows by even or odd number field value
mysql-logo

In this simple tutorial I will show to select or update rows in your mysql table based on a stored even or add number in a specific field of your table. Your result might look like this: For example you…

Read More→

How to create a user in MySQL/MariaDB and grant permissions on a specific database

Arvind KumarMySQLLeave a Comment on How to create a user in MySQL/MariaDB and grant permissions on a specific database
mysql-logo

To create a user in MySQL or MariaDB and granting it permissions to access a database is a basic task when deploying a new website on a LAMP stack server. To read and write data on a database is a very common…

Read More→

How to enable MySQL slow query log and analyze it on Linux

Arvind KumarMySQLLeave a Comment on How to enable MySQL slow query log and analyze it on Linux
mysql-logo

MySQL slow query log is helpful when you needed to debug slow down or failure of your MySQL server. Slow query log can house queries which took more than n number of seconds.

Export, Import MySQL db between different servers through Linux command line

Arvind KumarLinux/Unix, MySQLLeave a Comment on Export, Import MySQL db between different servers through Linux command line
mysql-logo

You should have Database name, Database Username, Database Password and command line access to your server Export database to local file system, for example /var/www/html

MYSQL – Useful commands you must know – Part-1

Arvind KumarMySQLLeave a Comment on MYSQL – Useful commands you must know – Part-1

To know the current MYSQL version: SELECT version(); To format and formulate a float value: FORMAT(SUM(amount) * 0.6, 2) The above line sums up entire amount value, cut it down to 60% of total value and returns value precised up…

Read More→

MySQL ‘show tables’: How to list tables in a MySQL database?

Arvind KumarMySQLLeave a Comment on MySQL ‘show tables’: How to list tables in a MySQL database?
mysql-logo

This is very commonly asked question: How do I show or list all the tables in a MySQL (or MariaDB) database using mysql command line tool? In brief, to show the tables in a MySQL database, run the command:

How to Replace a Text String in a MySQL Table Field Value

Arvind KumarMySQLLeave a Comment on How to Replace a Text String in a MySQL Table Field Value
mysql-logo

In this simple tutorial you will learn to replace a text string in a MySQL table field value. I have a races table in which I store race event information. In the date field I store event date. Since these…

Read More→

Updating two columns with a subquery in MySQL

Arvind KumarMySQLLeave a Comment on Updating two columns with a subquery in MySQL
mysql-logo

Sometimes you wanted to update columns of one MySQL table by quering another MySQL table and getting a column value from the later table. For example you have a ‘students’ table and you wanted to create a new field ‘totalMarks’…

Read More→

To print the table structure of MySQL table in PHP

Arvind KumarMySQL, PHPLeave a Comment on To print the table structure of MySQL table in PHP
A simple way to debug a php application in production mode

You can print the table structure of MySQL table in PHP using simple php script. All you need to do is to make a ‘describe table’ call and process it using php script, similar to one you use to print…

Read More→

Changing database character set

Arvind KumarMySQL, WordPressLeave a Comment on Changing database character set
mysql-logo

Why to consider changing database character set? Why do i need to do this? As to find a more straight answer please look at the image below, taken from one of my websites built in WordPress:

Posts navigation

1 2 Next
  • Useful Linux Commands
  • Disk Space Usage Commands
  • Top Directory Linux commands

Recent Posts

  • How to Remove Appends Attributes from Laravel Eloquent Model
  • How TO – Remove a Property from an Object in JavaScript
  • Array Destructuring With or Without List Function in PHP
  • Git Cannot open .git/FETCH_HEAD: Permission denied Solution
  • How to Check Laravel Version using CLI and File System

About Arvind

Arvind Thakur is a Full Stack Web Developer. He founded and runs a Software Development company by the name Inimist Technologies in Chandigarh, India. >> know more
Copyright © All rights reserved.
Blog Kit by WP Charms