Understand Permissions Granted to a User in MySQL
In MySQL, you can know the permissions granted to an user using the following statement. We will now use this code to find the permissions available for user user_admin. This
In MySQL, you can know the permissions granted to an user using the following statement. We will now use this code to find the permissions available for user user_admin. This
At times, it is necessary to replace full or partial value in a column. The following command will be handy in achieving the this result. UPDATE TABLE_NAME SET COLUMN_NAME =
We may want to use a table to store values while computing, which in turn might be used by subsequent processing. But, for sure, this working data must not be
Command to backup: mysqldump databaseName backupFilename.sql Where mysqldump?is the command, databaseName?is the name of the database and backupFilename?is the name of the file in which the data will be backed
The command “SHOW GRANTS” will display the privileges that the current user has. Command: SHOW GRANTSSample output:+——————————————————————————————————————+|Grants for dbuser@% |+——————————————————————————————————————+| GRANT ALL PRIVILEGES ON *.* TO ‘dbuser’@’%’ IDENTIFIED BY PASSWORD
MySQL provides a function DATEDIFF?that takes two arguments, first date and the second date. The function computes the difference between them and returns a positive result if the first date
MySQL’s Show Tables?command lists out the tables in the current database. Just execute the command with no parameters. SHOW TABLES
Connecting to a MySQL database from the command prompt can be very easy: [root@mypc]#mysql -S /opt/db/mysql//mysql.sock -uroot -prootPassword Here, we are trying to connect to the MySQL database Installed in
MySQL provides a command named LIKE that can be used in CREATE TABLE command. This is most useful when you want to create a new table along with the indexes