In this article, let us review how to install MySQL on CentOS using yum. Instead of searching and installing mysql and related packages one-by-one, it is better to install MySQL using yum groups. If you are interested in installing the full LAMP stack, refer to our earlier article on how to install/upgrade LAMP using yum. [...]
MySQL
A while back we tried to customize unix prompt to look like Angelina Jolie. Oh boy, didn’t I fail miserably in that attempt? Well, that didn’t stop me from trying an extreme makeover for mysql> prompt. Let us face it. The following mysql> prompt is boring. Nobody wants to see it. Let us change the [...]
Question: How do I disable mysql history? I don’t want mysql to remember the previous commands that I typed from the mysql> prompt. This is important for me, as when I type some sql commands that contains passwords, I see the clear text password stored in the ~/.mysql_history, which I don’t want to happen. Answer: [...]
Forgot your MySQL root user password? Don’t worry. We are here for rescue. When you tried to login to root without entering a password, you may get ‘Access Denied’ message, as MySQL is expecting a password. This article explains how to recover mysql root password by setting a new MySQL password when you don’t remember [...]
In all the 15 mysqladmin command-line examples below, tmppassword is used as the MySQL root user password. Please change this to your MySQL root password. 1. How to change the MySQL root user password? # mysqladmin -u root -ptmppassword password 'newpassword' # mysql -u root -pnewpassword Welcome to the MySQL monitor. Commands end with ; [...]
Starting from MySQL 5, when you execute show databases command, information_schema will be listed in the database list. information_schema is a virtual MySQL database that stores metadata information of all the MySQL databases. Typically you will execute either DESCRIBE or SHOW commands to get the metadata information. However using the information_schema views, you can execute [...]
Bugzilla, an open source bug tracking system uses MySQL for the database. When you try to attach a document to the bug that is greater than 1MB in size, you will get the error message shown below. This article explains how to fix this problem by changing the MySQL max_allowed_packet database parameter and bugzilla maxattachmentsize [...]
Uploading several rows of data from a text, csv, and excel file into a MySQL table is a routine task for sysadmins and DBAs who are managing MySQL database. This article explains 4 practical examples on how to import data from a file to MySQL table using both mysqlimport and “load data local infile” method. [...]