Databases
Errors and Fixes
Articles
Call to undefined function mb_strlen() error via WHM
Call to undefined function mb_strlen() means the PHP mbstring extension is not loaded for the PHP version your site uses. Many applications (WordPress plugins,...
Delete MySQL database through command line
Sometimes we need to delete a MySQL database through the command line. Before deleting a database you must check these points like you must have root access, before...
Error mysqld_safe: a mysqld process already exists
During this time, your website won't load because it cannot connect to the database. So before I start, please note the circumstances in which this error occurs:1)....
Error: 1045 cannot log in to the MySQL server
To solve this error you have to follow some simple steps which are given below...1. Check whether the MYSQL is running or not by the following command:
#...
How To Create Hot Backups of MySQL Databases with Percona XtraBackup?
A hot backup copies a running database without stopping it or locking tables for long. Which tool you need depends on the server:
MySQL 8.0 / 8.4 or Percona Server:...
How To Secure MySQL Server On Cpanel?
MySQL is among the most common database servers majorly used on Linux the operating systems. It is technically very strong. All the modern applications based on...
How to Backup a Database Using mysqldump in MySQL or MariaDB
MySQL and MariaDB allow the mysqldump service to make easier the process of creating a backup of database or system of databases.
Using mysqldump performs a proper...
How to Backup or Restore MySQL, MariaDB and PostgreSQL Using Automysqlbackup and Autopostgresqlbackup Tools?
automysqlbackup and autopostgresqlbackup create daily, weekly and monthly database dumps with automatic rotation. Both are packaged for Ubuntu 24.04 and Debian 12; on...
How to Change a User Password in PostgreSQL
You change PostgreSQL passwords from the psql shell, either with the \password command or with ALTER USER. We tested both on PostgreSQL 17: the new password worked and...
How to Change or Reset the MySQL Root Password (and MariaDB)
To change the MySQL root password when you can still log in, run this as the MySQL root user:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'New-Strong-Password';
If the...
How to Check and Change max_connections in MySQL and MariaDB (Too Many Connections)
To see the connection limit, run this in the MySQL or MariaDB client (as root or an admin user):
SHOW VARIABLES LIKE 'max_connections';
+-----------------+-------+
|...
How to Check the MySQL Version: SQL Query, Command Line, phpMyAdmin and cPanel
The quickest MySQL version query is SELECT VERSION();. Run it in any MySQL or MariaDB client, phpMyAdmin’s SQL tab or your application, and it returns the...
How to Connect to a MySQL Database from the Command Line (Local and Remote)
To connect to a MySQL database from a terminal on the server, run mysql -u USER -p DATABASE and type the password when asked. From another computer, add the server...
How to Create a Table in MySQL (CREATE TABLE with Examples)
A table is created with CREATE TABLE, followed by the table name and a list of columns and keys in brackets. You can run it in the mysql command-line client, or paste...
How to Disable XML-RPC?
If you ever want to publish or access your blog remotely then you always need XML-RPC. it’s always must that you should enable XML-RPC in your WordPress. Basically,...
How to Import CSV file into database with SQL?
To import a comma separated file or CSV file using the database, you should first create a table on the SQL server. Tables that are created is useful for importing CSV...
How to Install MySQL on Ubuntu 26.04 and 24.04
Run sudo apt install mysql-server. Ubuntu 26.04 installs MySQL 8.4 LTS; Ubuntu 24.04 installs MySQL 8.0. Oracle has moved the 8.0 series to Sustaining Support and...
How to Install PostgreSQL and psql on Ubuntu 26.04 and 24.04
To install PostgreSQL on Ubuntu, run sudo apt update && sudo apt install postgresql. That gives you the server and the psql client: PostgreSQL 18 on Ubuntu...
How to Reset the SQL Server sa Password (Windows and Linux)
There is no default sa password. You choose it when SQL Server is installed in mixed mode, and if nobody knows it, you reset it. How you do that depends on whether you...
How to Restore a SQL Server Database from a .bak File (SSMS, T-SQL and Linux)
To restore a SQL Server database from a .bak file, in SSMS right-click Databases, choose Restore Database, select Device, add the .bak file and select OK. In T-SQL it...
How to change mySql max_allowed_packet ?
max_allowed_packet is the largest single query or row MySQL/MariaDB accepts. Imports of big rows (for example images stored in the database) fail with "MySQL server...
How to change the database user password in cPanel?
To change the database user password from cPanel:
1. Log into cPanel.
2. Click on “MySQL databases” under the databases tab.
3. Scroll down. There is an option to...
How to check MySQL query caching status?
The MySQL query cache stored the results of SELECT queries. It was removed completely in MySQL 8.0, and MariaDB has it switched off by default since version 10.1.7,...
How to clear eximstatus database entries?
cPanel's eximstats keeps statistics about delivered, deferred and failed email, which WHM shows in its mail reports. Older guides emptied a MySQL database called...
How to create Ms Access Database DSN for Plesk Control Panel?
How to upload the database?Step 1: Login to control panel of Plesk and select File Manager.Step 2: Now, search for the folder “App_data” and choose upload files.Step...