Tag: MariaDB

Choose UPDATE mysql.user SET or ALTER USER? (SOLVED)

Each MySQL and MariaDB user can have various settings, such as permission (grants) to execute certain queries to all or specific databases. Users also have settings related to identification (login) on the DBMS server, such as: user password, used authentication plugin. To change user settings such as password and authentication plugin, you can choose one of the following commands: UPDATE...

How to check what MySQL/MariaDB users exist and their characteristics

Contents How to display the names of all MySQL/MariaDB users How to display the names of all users and their hosts in MySQL/MariaDB How to check which users are allowed to log in without a password in MySQL/MariaDB How to check which users have expired passwords in MySQL/MariaDB. How to list users with expired passwords How to check which plugin...

How to display only column names and nothing more for a table in MySQL and MariaDB

How to display only field names in SHOW COLUMNS Let's look at a situation when in MySQL and MariaDB you need to get information not from the table, but about the table itself, for example, field names. We have already looked at how to get a list of fields for any table; for this, an SQL query with the SHOW...

How to display results in MySQL and MariaDB without a table and without extraneous characters

Contents How to output data without a table when saving results to a file How to display results without a table on the screen How to display results in mariadb and mysql clients without a table How to configure the output of results without a table by default When working with MySQL and MariaDB in the command line, the results...

How to check if a SQL query result is empty or not empty in PHP

When executing a SQL query to a database, the rows and columns of a table can be returned as the execution result. An empty value can also be returned if no data matching the query is found in the table. The usual algorithm for processing the received response from the database is to fetch the SQL query result row by...

How to find rows with empty column value in MySQL/MariaDB table (in phpMyAdmin and in command line)

How to find rows with empty column value in phpMyAdmin Suppose you want to find rows in a table where the value of a certain column is empty. To do this, you try to use the table search in phpMyAdmin. If you go to the “Search” tab in phpMyAdmin and click the “Go” button without entering any values (since you...

How to copy a table in MySQL/MariaDB

Backup a table in the same database This article will tell you how to make a copy of a table in the MySQL/MariaDB command line interface. Usually, backups of databases and tables are saved to files, but let's consider a situation when you need to duplicate or clone data, structure and indexes of tables in the same or another database...

How to copy a table in phpMyAdmin

Backup of a table in the same database This article will tell you how to make a copy of a table in phpMyAdmin. Usually, backups of databases and tables are saved to files, but let's consider a situation when you need to duplicate or clone data, structure and indexes of tables in the same or another database in the phpMyAdmin...

How to list columns in MySQL/MariaDB. How to check if a column exists in a table in PHP

Consider a situation where you need to find out whether a certain column exists in a table that is located in a database managed by a MySQL or MariaDB DBMS. In this post, we'll look at the SQL query syntax for getting a list of columns and searching for columns by name. We will also look at how to check...

ERROR at line 1: Unknown command '\-'. (SOLVED)

The database management systems (DBMS) MariaDB and MySQL are quite compatible with each other (at least in basic functionality). And until recently, it was possible to import and export databases from MariaDB to MySQL and vice versa without any problems. If you have updated MariaDB to the latest version, you may receive the following error when importing a database into...
Loading...
X