≡ Menu

mysql command

Check The Number Of MySQL Open Database Connections on Linux Or Unix-like Server

I'm a new MySQL server user. My server is running on a CentOS Linux. How can I check the number of active MySQL connections on Linux based system?
[click to continue…]

WordPress MySql Statement To Delete All Pending Comments

I have over 1800+ pending comments and most of them are spams in WordPress based blog. How do I delete all (mass delete) the pending comments using sql statements?
[click to continue…]

CentOS Linux 5/6: Install MySQL Client Only

I have MySQL database server running on Sun Solaris Unix based server. I am using CentOS and I would like to install mysql client only? How do I install mysql client only but skil the entire mysql database installation on CentOS Linux? Is there a way to only install the mysql client on CentOS Linux based Lenovo thinkpad T series?
[click to continue…]

MySQL: Connect From an Other System / Computer

How do I connect to my MySQL database server from an other server (say Apache or Tomcat app server) in same VLAN under CentOS / Fedora / RHEL / Redhat Linux?
[click to continue…]

Find Out MySQL Version

How do I find out mysql version under Linux or Unix operating systems?
[click to continue…]

Ubuntu Linux: Install MySQL Server Version 5

How do I install Oracle (Sun) MySQL database server version 5.x under Ubuntu Linux operating systems? How do I add a new user and database for Apache web server and php access under Ubuntu Linux?
[click to continue…]

RedHat / CentOS Install and Configure Cacti Network Graphing Tool

Cacti is a network graphing tool similar to MRTG. How do I install and configure common options to collect SNMP data and various other data (such as system load, network link status, hard disk space, logged in users etc) into an RRD?
[click to continue…]

MySQL/MariaDB: Run SQL Queries From A Shell Prompt / Command Line

How do I specify or run MySQL or MariaDB SQL queries on the UNIX or Linux command line?
[click to continue…]

Restore a backup of a MySQL Database Server

Q. How can I restore a backup of a MySQL database server made with mysqldump program discussed here?

A. You can use standard mysql - the MySQL command-line tool to restore a backup of a MySQL database server.

Read back dump file

You can read the dump file back into the server like this:
mysql db-name < backup-file.sql To restore database called sales, first create the database sales: $ mysql -u root -p
Now create database called sales using SQL statement:

mysql> CREATE DATABASE sales;
mysql> quit;

Now restore database, enter:
$ mysql -u root -p sales < /path/to/sales-backup-file.sql

MySQL Change a User Password

I would like to change a password for a user called tom using UNIX / Linux command line option. How do I change a user password under MySQL server?
[click to continue…]